Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f6a36e94
Commit
f6a36e94
authored
May 05, 2001
by
monty@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added LOAD DATA CONCURRENT
parent
a580233a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
Docs/manual.texi
Docs/manual.texi
+21
-1
scripts/mysqlhotcopy.sh
scripts/mysqlhotcopy.sh
+1
-1
sql/lex.h
sql/lex.h
+1
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+9
-1
No files found.
Docs/manual.texi
View file @
f6a36e94
...
...
@@ -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
scripts/mysqlhotcopy.sh
View file @
f6a36e94
...
...
@@ -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 ALPH
A. Comments/patches welcome.
WARNING: THIS
PROGRAM IS STILL IN BET
A. Comments/patches welcome.
=
cut
...
...
sql/lex.h
View file @
f6a36e94
...
...
@@ -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
},
...
...
sql/sql_yacc.yy
View file @
f6a36e94
...
...
@@ -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 {}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment