Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5b996782
Commit
5b996782
authored
Dec 24, 2018
by
Kentoku
Committed by
Sachin
Feb 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-16279 Spider crashes on CHECKSUM TABLE with spider_quick_mode=3
add tests
parent
540e82d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
284 additions
and
0 deletions
+284
-0
storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_deinit.inc
...pider/include/checksum_table_with_quick_mode_3_deinit.inc
+15
-0
storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc
.../spider/include/checksum_table_with_quick_mode_3_init.inc
+31
-0
storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result
...sql-test/spider/r/checksum_table_with_quick_mode_3.result
+104
-0
storage/spider/mysql-test/spider/t/checksum_table_with_quick_mode_3.test
...mysql-test/spider/t/checksum_table_with_quick_mode_3.test
+134
-0
No files found.
storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_deinit.inc
0 → 100644
View file @
5b996782
--
let
$MASTER_1_COMMENT_2_1
=
$MASTER_1_COMMENT_2_1_BACKUP
--
let
$CHILD2_1_DROP_TABLES
=
$CHILD2_1_DROP_TABLES_BACKUP
--
let
$CHILD2_1_CREATE_TABLES
=
$CHILD2_1_CREATE_TABLES_BACKUP
--
let
$CHILD2_1_SELECT_TABLES
=
$CHILD2_1_SELECT_TABLES_BACKUP
--
let
$OUTPUT_CHILD_GROUP2
=
$OUTPUT_CHILD_GROUP2_BACKUP
--
let
$USE_GENERAL_LOG
=
$USE_GENERAL_LOG_BACKUP
--
connection
master_1
set
session
spider_quick_mode
=
@
old_spider_quick_mode
;
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../
t
/
test_deinit
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc
0 → 100644
View file @
5b996782
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../
t
/
test_init
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
--
let
$MASTER_1_COMMENT_2_1_BACKUP
=
$MASTER_1_COMMENT_2_1
let
$MASTER_1_COMMENT_2_1
=
COMMENT
=
'table "tbl_a", srv "s_2_1"'
;
--
let
$CHILD2_1_DROP_TABLES_BACKUP
=
$CHILD2_1_DROP_TABLES
let
$CHILD2_1_DROP_TABLES
=
DROP
TABLE
IF
EXISTS
tbl_a
;
--
let
$CHILD2_1_CREATE_TABLES_BACKUP
=
$CHILD2_1_CREATE_TABLES
let
$CHILD2_1_CREATE_TABLES
=
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$CHILD2_1_ENGINE
$CHILD2_1_CHARSET
;
--
let
$CHILD2_1_SELECT_TABLES_BACKUP
=
$CHILD2_1_SELECT_TABLES
let
$CHILD2_1_SELECT_TABLES
=
SELECT
pkey
FROM
tbl_a
ORDER
BY
pkey
;
let
$CHILD2_1_SELECT_ARGUMENT1
=
SELECT
argument
FROM
mysql
.
general_log
WHERE
argument
LIKE
'%select %'
;
--
let
$OUTPUT_CHILD_GROUP2_BACKUP
=
$OUTPUT_CHILD_GROUP2
--
let
$OUTPUT_CHILD_GROUP2
=
1
--
let
$USE_GENERAL_LOG_BACKUP
=
$USE_GENERAL_LOG
--
let
$USE_GENERAL_LOG
=
1
--
connection
master_1
set
@
old_spider_quick_mode
=
@@
spider_quick_mode
;
set
session
spider_quick_mode
=
3
;
storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result
0 → 100644
View file @
5b996782
for master_1
for child2
child2_1
child2_2
child2_3
for child3
child3_1
child3_2
child3_3
connection master_1;
set @old_spider_quick_mode= @@spider_quick_mode;
set session spider_quick_mode= 3;
drop and create databases
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
DROP DATABASE IF EXISTS auto_test_remote;
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_DROP_TABLES
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
DROP TABLE IF EXISTS tbl_a;
CREATE TABLE tbl_a (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
CHECKSUM TABLE tbl_a EXTENDED;
Table Checksum
auto_test_local.tbl_a 1061386331
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
select `pkey` from `auto_test_remote`.`tbl_a`
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_quick_mode= @old_spider_quick_mode;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
child3_1
child3_2
child3_3
end of test
storage/spider/mysql-test/spider/t/checksum_table_with_quick_mode_3.test
0 → 100644
View file @
5b996782
--
source
../
include
/
checksum_table_with_quick_mode_3_init
.
inc
--
echo
--
echo
drop
and
create
databases
--
connection
master_1
--
disable_warnings
DROP
DATABASE
IF
EXISTS
auto_test_local
;
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
if
(
$USE_CHILD_GROUP2
)
{
--
connection
child2_1
if
(
$USE_GENERAL_LOG
)
{
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
GLOBAL
log_output
=
'TABLE,FILE'
;
}
DROP
DATABASE
IF
EXISTS
auto_test_remote
;
CREATE
DATABASE
auto_test_remote
;
USE
auto_test_remote
;
}
--
enable_warnings
--
echo
--
echo
create
table
and
insert
if
(
$USE_CHILD_GROUP2
)
{
if
(
!
$OUTPUT_CHILD_GROUP2
)
{
--
disable_query_log
--
disable_result_log
}
--
connection
child2_1
if
(
$OUTPUT_CHILD_GROUP2
)
{
--
disable_query_log
echo
CHILD2_1_DROP_TABLES
;
echo
CHILD2_1_CREATE_TABLES
;
}
--
disable_warnings
eval
$CHILD2_1_DROP_TABLES
;
--
enable_warnings
eval
$CHILD2_1_CREATE_TABLES
;
if
(
$OUTPUT_CHILD_GROUP2
)
{
--
enable_query_log
}
if
(
$USE_GENERAL_LOG
)
{
TRUNCATE
TABLE
mysql
.
general_log
;
}
if
(
!
$OUTPUT_CHILD_GROUP2
)
{
--
enable_query_log
--
enable_result_log
}
}
--
connection
master_1
--
disable_warnings
DROP
TABLE
IF
EXISTS
tbl_a
;
--
enable_warnings
--
disable_query_log
echo
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
MASTER_1_ENGINE
MASTER_1_CHARSET
MASTER_1_COMMENT_2_1
;
eval
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$MASTER_1_ENGINE
$MASTER_1_CHARSET
$MASTER_1_COMMENT_2_1
;
--
enable_query_log
INSERT
INTO
tbl_a
(
pkey
)
VALUES
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
INSERT
INTO
tbl_a
(
pkey
)
VALUES
(
10
),(
11
),(
12
),(
13
),(
14
),(
15
),(
16
),(
17
),(
18
),(
19
);
INSERT
INTO
tbl_a
(
pkey
)
VALUES
(
20
),(
21
),(
22
),(
23
),(
24
),(
25
),(
26
),(
27
),(
28
),(
29
);
--
echo
--
echo
select
test
1
if
(
$USE_CHILD_GROUP2
)
{
if
(
!
$OUTPUT_CHILD_GROUP2
)
{
--
disable_query_log
--
disable_result_log
}
--
connection
child2_1
if
(
$USE_GENERAL_LOG
)
{
TRUNCATE
TABLE
mysql
.
general_log
;
}
if
(
!
$OUTPUT_CHILD_GROUP2
)
{
--
enable_query_log
--
enable_result_log
}
}
--
connection
master_1
CHECKSUM
TABLE
tbl_a
EXTENDED
;
if
(
$USE_CHILD_GROUP2
)
{
if
(
!
$OUTPUT_CHILD_GROUP2
)
{
--
disable_query_log
--
disable_result_log
}
--
connection
child2_1
if
(
$USE_GENERAL_LOG
)
{
eval
$CHILD2_1_SELECT_ARGUMENT1
;
}
eval
$CHILD2_1_SELECT_TABLES
;
if
(
!
$OUTPUT_CHILD_GROUP2
)
{
--
enable_query_log
--
enable_result_log
}
}
--
echo
--
echo
deinit
--
disable_warnings
--
connection
master_1
DROP
DATABASE
IF
EXISTS
auto_test_local
;
if
(
$USE_CHILD_GROUP2
)
{
--
connection
child2_1
DROP
DATABASE
IF
EXISTS
auto_test_remote
;
if
(
$USE_GENERAL_LOG
)
{
SET
GLOBAL
log_output
=
@
old_log_output
;
}
}
--
enable_warnings
--
source
../
include
/
checksum_table_with_quick_mode_3_deinit
.
inc
--
echo
--
echo
end
of
test
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment