diff options
author | unknown <monty@donna.mysql.fi> | 2001-05-05 09:41:47 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-05-05 09:41:47 +0300 |
commit | 62bff11cb46c059b1fcb2aeba5e65ec99e7d3448 (patch) | |
tree | 18710d49c064aa27303b17375f91694ef08c5c33 | |
parent | 203c3eeb4c0b451092cb0c1ab1115d0bd179c0e2 (diff) | |
download | mariadb-git-62bff11cb46c059b1fcb2aeba5e65ec99e7d3448.tar.gz |
Added LOAD DATA CONCURRENT
Docs/manual.texi:
Update information about REPAIR and optimize
scripts/mysqlhotcopy.sh:
Changed Alpha -> Beta
sql/sql_yacc.yy:
A
-rw-r--r-- | Docs/manual.texi | 22 | ||||
-rw-r--r-- | scripts/mysqlhotcopy.sh | 2 | ||||
-rw-r--r-- | sql/lex.h | 1 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 10 |
4 files changed, 32 insertions, 3 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 47a151795e4..22c8f379327 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -20510,7 +20510,8 @@ like you could do this, but that was a bug that has been corrected. @section @code{LOAD DATA INFILE} Syntax @example -LOAD DATA [LOW_PRIORITY] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] +LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' + [REPLACE | IGNORE] INTO TABLE tbl_name [FIELDS [TERMINATED BY '\t'] @@ -20538,6 +20539,12 @@ If you specify the keyword @code{LOW_PRIORITY}, execution of the @code{LOAD DATA} statement is delayed until no other clients are reading from the table. +If you specify the keyword @code{CONCURRENT} with a @code{MyISAM} table, +then other threads can retrieve data from the table while @code{LOAD +DATA} is executing. Using this option will of course affect the +performance of @code{LOAD DATA} a bit even if no other thread is using +the table at the same time. + Using @code{LOCAL} will be a bit slower than letting the server access the files directly, because the contents of the file must travel from the client host to the server host. On the other hand, you do not need the @@ -36784,6 +36791,17 @@ thread that is waiting on the disk-full condition will allow the other threads to continue. @end itemize +Exceptions to the above behaveour is when you use @code{REPAIR} or +@code{OPTIMIZE} or when the indexes are created in a batch after an +@code{LOAD DATA INFILE} or after an @code{ALTER TABLE} statement. + +All of the above commands may use big temporary files that left to +themself would cause big problems for the rest of the system. If +@strong{MySQL} gets disk full while doing any of the above operations, +it will remove the big temporary files and mark the table as crashed +(except for @code{ALTER TABLE}, in which the old table will be left +unchanged). + @node Multiple sql commands, Temporary files, Full disk, Problems @section How to Run SQL Commands from a Text File @@ -44096,6 +44114,8 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.38 @itemize @bullet @item +Added option @code{CONCURRENT} to @code{LOAD DATA}. +@item Fixed bug when too many rows where removed when using @code{SELECT DISTINCT ... HAVING}. @item diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index da8c6fced53..1c26bf8e2d6 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -30,7 +30,7 @@ mysqlhotcopy - fast on-line hot-backup utility for local MySQL databases and tab mysqlhotcopy --method='scp -Bq -i /usr/home/foo/.ssh/identity' --user=root --password=secretpassword \ db_1./^nice_table/ user@some.system.dom:~/path/to/new_directory -WARNING: THIS IS VERY MUCH A FIRST-CUT ALPHA. Comments/patches welcome. +WARNING: THIS PROGRAM IS STILL IN BETA. Comments/patches welcome. =cut diff --git a/sql/lex.h b/sql/lex.h index 6c83cb34366..d5df5ed5511 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -88,6 +88,7 @@ static SYMBOL symbols[] = { { "COMMIT", SYM(COMMIT_SYM),0,0}, { "COMMITTED", SYM(COMMITTED_SYM),0,0}, { "COMPRESSED", SYM(COMPRESSED_SYM),0,0}, + { "CONCURRENT", SYM(CONCURRENT),0,0}, { "CONSTRAINT", SYM(CONSTRAINT),0,0}, { "CREATE", SYM(CREATE),0,0}, { "CROSS", SYM(CROSS),0,0}, diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 1196d279e5c..3caa956ebea 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -145,6 +145,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token COMMITTED_SYM %token COLUMNS %token COLUMN_SYM +%token CONCURRENT %token CONSTRAINT %token DATABASES %token DATA_SYM @@ -2339,7 +2340,7 @@ use: USE_SYM ident /* import, export of files */ -load: LOAD DATA_SYM opt_low_priority opt_local INFILE TEXT_STRING +load: LOAD DATA_SYM load_data_lock opt_local INFILE TEXT_STRING { Lex->sql_command= SQLCOM_LOAD; Lex->local_file= $4; @@ -2366,6 +2367,12 @@ opt_local: /* empty */ { $$=0;} | LOCAL_SYM { $$=1;} +load_data_lock: + /* empty */ { Lex->lock_option= current_thd->update_lock_default; } + | CONCURRENT { Lex->lock_option= TL_WRITE_CONCURRENT_INSERT ; } + | LOW_PRIORITY { Lex->lock_option= TL_WRITE_LOW_PRIORITY; } + + opt_duplicate: /* empty */ { Lex->duplicates=DUP_ERROR; } | REPLACE { Lex->duplicates=DUP_REPLACE; } @@ -2523,6 +2530,7 @@ keyword: | COMMIT_SYM {} | COMMITTED_SYM {} | COMPRESSED_SYM {} + | CONCURRENT {} | DATA_SYM {} | DATETIME {} | DATE_SYM {} |