mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-32216 Option --parallel in mariadb-import
This is done for symmetry with mariadb-dump, which does not use threads but allows parallelism via --parallel Traditional --use-threads can still be used, it is synonymous with --parallel
This commit is contained in:
@ -148,6 +148,9 @@ static struct my_option my_long_options[] =
|
||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"parallel", 'j', "Number of LOAD DATA jobs executed in parallel",
|
||||
&opt_use_threads, &opt_use_threads, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
|
||||
&opt_plugin_dir, &opt_plugin_dir, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -170,9 +173,7 @@ static struct my_option my_long_options[] =
|
||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"use-threads", OPT_USE_THREADS,
|
||||
"Load files in parallel. The argument is the number "
|
||||
"of threads to use for loading data.",
|
||||
{"use-threads", OPT_USE_THREADS, "Synonym for --parallel option",
|
||||
&opt_use_threads, &opt_use_threads, 0,
|
||||
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
|
@ -2487,7 +2487,7 @@ SELECT * FROM t2;
|
||||
--exec $MYSQL db_20772273 < $MYSQLTEST_VARDIR/tmp/t2.sql
|
||||
|
||||
# Test mysqlimport with multiple threads
|
||||
--exec $MYSQL_IMPORT --silent --use-threads=2 db_20772273 $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
|
||||
--exec $MYSQL_IMPORT --silent --parallel=2 db_20772273 $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
|
||||
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
|
Reference in New Issue
Block a user