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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
102c4777
Commit
102c4777
authored
May 26, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added testing of LOAD DATA ... STARTING BY
Added read_only variable
parent
fc0df599
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
6 deletions
+18
-6
mysql-test/r/loaddata.result
mysql-test/r/loaddata.result
+7
-0
mysql-test/t/loaddata.test
mysql-test/t/loaddata.test
+8
-0
sql/log_event.cc
sql/log_event.cc
+1
-2
sql/set_var.cc
sql/set_var.cc
+2
-3
sql/sql_update.cc
sql/sql_update.cc
+0
-1
No files found.
mysql-test/r/loaddata.result
View file @
102c4777
...
@@ -8,4 +8,11 @@ a b c d
...
@@ -8,4 +8,11 @@ a b c d
0000-00-00 0000-00-00 0000-00-00 0000-00-00
0000-00-00 0000-00-00 0000-00-00 0000-00-00
2003-03-03 2003-03-03 2003-03-03 NULL
2003-03-03 2003-03-03 2003-03-03 NULL
2003-03-03 2003-03-03 2003-03-03 NULL
2003-03-03 2003-03-03 2003-03-03 NULL
truncate table t1;
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
SELECT * from t1;
a b c d
NULL NULL 0000-00-00 0000-00-00
NULL 0000-00-00 0000-00-00 0000-00-00
NULL 2003-03-03 2003-03-03 NULL
drop table t1;
drop table t1;
mysql-test/t/loaddata.test
View file @
102c4777
...
@@ -8,4 +8,12 @@ create table t1 (a date, b date, c date not null, d date);
...
@@ -8,4 +8,12 @@ create table t1 (a date, b date, c date not null, d date);
load
data
infile
'../../std_data/loaddata1.dat'
into
table
t1
fields
terminated
by
','
;
load
data
infile
'../../std_data/loaddata1.dat'
into
table
t1
fields
terminated
by
','
;
load
data
infile
'../../std_data/loaddata1.dat'
into
table
t1
fields
terminated
by
','
IGNORE
2
LINES
;
load
data
infile
'../../std_data/loaddata1.dat'
into
table
t1
fields
terminated
by
','
IGNORE
2
LINES
;
SELECT
*
from
t1
;
SELECT
*
from
t1
;
truncate
table
t1
;
load
data
infile
'../../std_data/loaddata1.dat'
into
table
t1
fields
terminated
by
','
LINES
STARTING
BY
','
(
b
,
c
,
d
);
SELECT
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
sql/log_event.cc
View file @
102c4777
...
@@ -1946,8 +1946,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
...
@@ -1946,8 +1946,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
sql_error
=
ER_UNKNOWN_ERROR
;
sql_error
=
ER_UNKNOWN_ERROR
;
slave_print_error
(
rli
,
sql_error
,
slave_print_error
(
rli
,
sql_error
,
"Error '%s' running load data infile"
,
"Error '%s' running load data infile"
,
sql_error
?
thd
->
net
.
last_error
:
ER_SAFE
(
sql_error
));
ER_SAFE
(
ER_UNKNOWN_ERROR
));
free_root
(
&
thd
->
mem_root
,
0
);
free_root
(
&
thd
->
mem_root
,
0
);
return
1
;
return
1
;
}
}
...
...
sql/set_var.cc
View file @
102c4777
...
@@ -185,6 +185,7 @@ sys_var_thd_ulong sys_net_retry_count("net_retry_count",
...
@@ -185,6 +185,7 @@ sys_var_thd_ulong sys_net_retry_count("net_retry_count",
sys_var_thd_bool
sys_new_mode
(
"new"
,
&
SV
::
new_mode
);
sys_var_thd_bool
sys_new_mode
(
"new"
,
&
SV
::
new_mode
);
sys_var_thd_ulong
sys_read_buff_size
(
"read_buffer_size"
,
sys_var_thd_ulong
sys_read_buff_size
(
"read_buffer_size"
,
&
SV
::
read_buff_size
);
&
SV
::
read_buff_size
);
sys_var_bool_ptr
sys_readonly
(
"read_only"
,
&
opt_readonly
);
sys_var_thd_ulong
sys_read_rnd_buff_size
(
"read_rnd_buffer_size"
,
sys_var_thd_ulong
sys_read_rnd_buff_size
(
"read_rnd_buffer_size"
,
&
SV
::
read_rnd_buff_size
);
&
SV
::
read_rnd_buff_size
);
sys_var_long_ptr
sys_rpl_recovery_rank
(
"rpl_recovery_rank"
,
sys_var_long_ptr
sys_rpl_recovery_rank
(
"rpl_recovery_rank"
,
...
@@ -204,8 +205,6 @@ sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol",
...
@@ -204,8 +205,6 @@ sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol",
&
opt_slave_compressed_protocol
);
&
opt_slave_compressed_protocol
);
sys_var_long_ptr
sys_slave_net_timeout
(
"slave_net_timeout"
,
sys_var_long_ptr
sys_slave_net_timeout
(
"slave_net_timeout"
,
&
slave_net_timeout
);
&
slave_net_timeout
);
sys_var_bool_ptr
sys_readonly
(
"read_only"
,
&
opt_readonly
);
sys_var_long_ptr
sys_slow_launch_time
(
"slow_launch_time"
,
sys_var_long_ptr
sys_slow_launch_time
(
"slow_launch_time"
,
&
slow_launch_time
);
&
slow_launch_time
);
sys_var_thd_ulong
sys_sort_buffer
(
"sort_buffer_size"
,
sys_var_thd_ulong
sys_sort_buffer
(
"sort_buffer_size"
,
...
@@ -516,6 +515,7 @@ struct show_var_st init_vars[]= {
...
@@ -516,6 +515,7 @@ struct show_var_st init_vars[]= {
{
"port"
,
(
char
*
)
&
mysql_port
,
SHOW_INT
},
{
"port"
,
(
char
*
)
&
mysql_port
,
SHOW_INT
},
{
"protocol_version"
,
(
char
*
)
&
protocol_version
,
SHOW_INT
},
{
"protocol_version"
,
(
char
*
)
&
protocol_version
,
SHOW_INT
},
{
sys_read_buff_size
.
name
,
(
char
*
)
&
sys_read_buff_size
,
SHOW_SYS
},
{
sys_read_buff_size
.
name
,
(
char
*
)
&
sys_read_buff_size
,
SHOW_SYS
},
{
sys_readonly
.
name
,
(
char
*
)
&
sys_readonly
,
SHOW_SYS
},
{
sys_read_rnd_buff_size
.
name
,(
char
*
)
&
sys_read_rnd_buff_size
,
SHOW_SYS
},
{
sys_read_rnd_buff_size
.
name
,(
char
*
)
&
sys_read_rnd_buff_size
,
SHOW_SYS
},
{
sys_rpl_recovery_rank
.
name
,(
char
*
)
&
sys_rpl_recovery_rank
,
SHOW_SYS
},
{
sys_rpl_recovery_rank
.
name
,(
char
*
)
&
sys_rpl_recovery_rank
,
SHOW_SYS
},
#ifdef HAVE_QUERY_CACHE
#ifdef HAVE_QUERY_CACHE
...
@@ -525,7 +525,6 @@ struct show_var_st init_vars[]= {
...
@@ -525,7 +525,6 @@ struct show_var_st init_vars[]= {
#endif
/* HAVE_QUERY_CACHE */
#endif
/* HAVE_QUERY_CACHE */
{
sys_server_id
.
name
,
(
char
*
)
&
sys_server_id
,
SHOW_SYS
},
{
sys_server_id
.
name
,
(
char
*
)
&
sys_server_id
,
SHOW_SYS
},
{
sys_slave_net_timeout
.
name
,(
char
*
)
&
sys_slave_net_timeout
,
SHOW_SYS
},
{
sys_slave_net_timeout
.
name
,(
char
*
)
&
sys_slave_net_timeout
,
SHOW_SYS
},
{
sys_readonly
.
name
,
(
char
*
)
&
sys_readonly
,
SHOW_SYS
},
{
"skip_external_locking"
,
(
char
*
)
&
my_disable_locking
,
SHOW_MY_BOOL
},
{
"skip_external_locking"
,
(
char
*
)
&
my_disable_locking
,
SHOW_MY_BOOL
},
{
"skip_networking"
,
(
char
*
)
&
opt_disable_networking
,
SHOW_BOOL
},
{
"skip_networking"
,
(
char
*
)
&
opt_disable_networking
,
SHOW_BOOL
},
{
"skip_show_database"
,
(
char
*
)
&
opt_skip_show_db
,
SHOW_BOOL
},
{
"skip_show_database"
,
(
char
*
)
&
opt_skip_show_db
,
SHOW_BOOL
},
...
...
sql/sql_update.cc
View file @
102c4777
...
@@ -182,7 +182,6 @@ int mysql_update(THD *thd,
...
@@ -182,7 +182,6 @@ int mysql_update(THD *thd,
*/
*/
uint
length
;
uint
length
;
SORT_FIELD
*
sortorder
;
SORT_FIELD
*
sortorder
;
List
<
Item
>
fields
;
ha_rows
examined_rows
;
ha_rows
examined_rows
;
table
->
io_cache
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
table
->
io_cache
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
...
...
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