File: mysqlpump_concurrency.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (52 lines) | stat: -rw-r--r-- 1,996 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Created: 2015-05-15  Lalit Choudhary

--source include/no_valgrind_without_big.inc

--echo #
--echo # WL#7755  mysqlpump: Extend mysqldump functionalities
--echo #

# Creating DB's and populating different types of data init for MYSQLPUMP testing.
-- source include/mysqlpump_stmt.inc

# concurrency testing
# when single-transaction is used it is not recommended to use parallelism
--exec $MYSQL_PUMP --databases db1 --single-transaction > $MYSQLTEST_VARDIR/tmp/result_file_1.sql
--exec $MYSQL_PUMP --parallel-schemas=3:db2,db1_1gb --default-parallelism=2 --include-databases=db1_1gb,db1,db2 > $MYSQLTEST_VARDIR/tmp/result_file_2.sql

DROP DATABASE db1;
DROP DATABASE db2;
DROP DATABASE db1_1gb;

--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/result_file_2.sql

# --add-lock : Wrap data inserts on table with write lock on that table in output. This doesn't work with parallelism.
# Because for this restore will fail. eg.ERROR 1100 (HY000) at line 259: Table '<table_name>' was not locked with LOCK TABLES
#--exec $MYSQL_PUMP --parallel-schemas=3:db1 --parallel-schemas=db_1gb,db3 --include-databases=db1,db1_1gb,db3 --add-locks > $MYSQLTEST_VARDIR/tmp/result_file_3.sql
#DROP DATABASE db1;
#DROP DATABASE db3;
#DROP DATABASE db1_1gb;

#--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/result_file_3.sql

# --add-locks will not  work with multi-threaded dump. restore falis with error.
#--exec $MYSQL_PUMP --include-databases=db1,db1_1gb,db2 --add-locks > $MYSQLTEST_VARDIR/tmp/result_file_4.sql
#DROP DATABASE db1;
#DROP DATABASE db2;
#DROP DATABASE db1_1gb;

#--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/result_file_4.sql

--exec $MYSQL_PUMP --include-databases=db2,db1_1gb,db3 --default-parallelism=1  > $MYSQLTEST_VARDIR/tmp/result_file_5.sql
DROP DATABASE db2;
DROP DATABASE db3;
DROP DATABASE db1_1gb;

--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/result_file_5.sql

--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/  result_file*
# Cleanup
DROP DATABASE db1;
DROP DATABASE db2;
DROP DATABASE db3;
DROP DATABASE db1_1gb;