Commit e14d2448 authored by unknown's avatar unknown

Merge


sql/sql_yacc.yy:
  Auto merged
Docs/manual.texi:
  SCCS merged
parents 92cac1d7 b738e817
...@@ -20506,7 +20506,8 @@ like you could do this, but that was a bug that has been corrected. ...@@ -20506,7 +20506,8 @@ like you could do this, but that was a bug that has been corrected.
@section @code{LOAD DATA INFILE} Syntax @section @code{LOAD DATA INFILE} Syntax
@example @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 INTO TABLE tbl_name
[FIELDS [FIELDS
[TERMINATED BY '\t'] [TERMINATED BY '\t']
...@@ -20534,6 +20535,12 @@ If you specify the keyword @code{LOW_PRIORITY}, execution of the ...@@ -20534,6 +20535,12 @@ If you specify the keyword @code{LOW_PRIORITY}, execution of the
@code{LOAD DATA} statement is delayed until no other clients are reading @code{LOAD DATA} statement is delayed until no other clients are reading
from the table. 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 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 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 host to the server host. On the other hand, you do not need the
...@@ -36774,6 +36781,17 @@ thread that is waiting on the disk-full condition will allow the other ...@@ -36774,6 +36781,17 @@ thread that is waiting on the disk-full condition will allow the other
threads to continue. threads to continue.
@end itemize @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 @node Multiple sql commands, Temporary files, Full disk, Problems
@section How to Run SQL Commands from a Text File @section How to Run SQL Commands from a Text File
...@@ -44084,6 +44102,8 @@ not yet 100% confident in this code. ...@@ -44084,6 +44102,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.38 @appendixsubsec Changes in release 3.23.38
@itemize @bullet @itemize @bullet
@item @item
Added option @code{CONCURRENT} to @code{LOAD DATA}.
@item
Better error message when slave @code{max_allowed_packet} is to low to Better error message when slave @code{max_allowed_packet} is to low to
read a very long log event from the master read a very long log event from the master
@item @item
...@@ -30,7 +30,7 @@ mysqlhotcopy - fast on-line hot-backup utility for local MySQL databases and tab ...@@ -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 \ 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 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 =cut
......
...@@ -88,6 +88,7 @@ static SYMBOL symbols[] = { ...@@ -88,6 +88,7 @@ static SYMBOL symbols[] = {
{ "COMMIT", SYM(COMMIT_SYM),0,0}, { "COMMIT", SYM(COMMIT_SYM),0,0},
{ "COMMITTED", SYM(COMMITTED_SYM),0,0}, { "COMMITTED", SYM(COMMITTED_SYM),0,0},
{ "COMPRESSED", SYM(COMPRESSED_SYM),0,0}, { "COMPRESSED", SYM(COMPRESSED_SYM),0,0},
{ "CONCURRENT", SYM(CONCURRENT),0,0},
{ "CONSTRAINT", SYM(CONSTRAINT),0,0}, { "CONSTRAINT", SYM(CONSTRAINT),0,0},
{ "CREATE", SYM(CREATE),0,0}, { "CREATE", SYM(CREATE),0,0},
{ "CROSS", SYM(CROSS),0,0}, { "CROSS", SYM(CROSS),0,0},
......
...@@ -145,6 +145,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); ...@@ -145,6 +145,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token COMMITTED_SYM %token COMMITTED_SYM
%token COLUMNS %token COLUMNS
%token COLUMN_SYM %token COLUMN_SYM
%token CONCURRENT
%token CONSTRAINT %token CONSTRAINT
%token DATABASES %token DATABASES
%token DATA_SYM %token DATA_SYM
...@@ -2339,7 +2340,7 @@ use: USE_SYM ident ...@@ -2339,7 +2340,7 @@ use: USE_SYM ident
/* import, export of files */ /* 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->sql_command= SQLCOM_LOAD;
Lex->local_file= $4; Lex->local_file= $4;
...@@ -2366,6 +2367,12 @@ opt_local: ...@@ -2366,6 +2367,12 @@ opt_local:
/* empty */ { $$=0;} /* empty */ { $$=0;}
| LOCAL_SYM { $$=1;} | 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: opt_duplicate:
/* empty */ { Lex->duplicates=DUP_ERROR; } /* empty */ { Lex->duplicates=DUP_ERROR; }
| REPLACE { Lex->duplicates=DUP_REPLACE; } | REPLACE { Lex->duplicates=DUP_REPLACE; }
...@@ -2523,6 +2530,7 @@ keyword: ...@@ -2523,6 +2530,7 @@ keyword:
| COMMIT_SYM {} | COMMIT_SYM {}
| COMMITTED_SYM {} | COMMITTED_SYM {}
| COMPRESSED_SYM {} | COMPRESSED_SYM {}
| CONCURRENT {}
| DATA_SYM {} | DATA_SYM {}
| DATETIME {} | DATETIME {}
| DATE_SYM {} | DATE_SYM {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment