mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Adding thread support for mysqlimport. You can now specify a number of threads to use and it will thread the loading of the database. Anyone who has had to go through the pain of loading the database will immediatly get the reason for this.
This commit is contained in:
@@ -1048,3 +1048,27 @@ SET SQL_MODE = @old_sql_mode;
|
||||
|
||||
DROP TRIGGER tr1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Added for use-thread option
|
||||
#
|
||||
create table t1 (a text , b text);
|
||||
create table t2 (a text , b text);
|
||||
insert t1 values ("Duck, Duck", "goose");
|
||||
insert t1 values ("Duck, Duck", "pidgeon");
|
||||
insert t2 values ("We the people", "in order to perform");
|
||||
insert t2 values ("a more perfect", "union");
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
|
||||
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
|
||||
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t2.sql
|
||||
# The first load tests the pausing code
|
||||
--exec $MYSQL_IMPORT --use-threads=1 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
|
||||
# Now we test with multiple threads!
|
||||
--exec $MYSQL_IMPORT --use-threads=5 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
Reference in New Issue
Block a user