mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 11.4 into 11.6
This commit is contained in:
@ -44,7 +44,9 @@ SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
create table t1(id integer not null auto_increment primary key);
|
||||
insert into t1 values(0);
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' from t1;
|
||||
--enable_cursor_protocol
|
||||
delete from t1;
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1;
|
||||
enable_query_log;
|
||||
@ -52,9 +54,11 @@ select * from t1;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/t1;
|
||||
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1'
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
|
||||
FROM t1;
|
||||
--enable_cursor_protocol
|
||||
delete from t1;
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
|
||||
@ -97,9 +101,11 @@ INSERT INTO t1 (c1) VALUES
|
||||
SELECT * FROM t1;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
cat_file $MYSQLTEST_VARDIR/tmp/t1;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
@ -187,9 +193,11 @@ create table t1(f1 int);
|
||||
insert into t1 values(1),(null);
|
||||
create table t2(f2 int auto_increment primary key);
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t2;
|
||||
enable_query_log;
|
||||
@ -206,20 +214,24 @@ create table t1(f1 int, f2 timestamp not null default current_timestamp);
|
||||
create table t2(f1 int);
|
||||
insert into t2 values(1),(2);
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1;
|
||||
enable_query_log;
|
||||
select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/t2;
|
||||
delete from t1;
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2'
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
|
||||
FROM t2;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
|
||||
enable_query_log;
|
||||
@ -238,9 +250,11 @@ INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1
|
||||
SELECT * FROM t1;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
cat_file $MYSQLTEST_VARDIR/tmp/t1;
|
||||
echo EOF;
|
||||
|
||||
@ -379,8 +393,10 @@ SET sql_mode = '';
|
||||
|
||||
--disable_ps2_protocol
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file'
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM;
|
||||
|
||||
@ -392,17 +408,21 @@ SELECT * FROM t1;
|
||||
|
||||
# show we can write this with OUTFILE, forcing the parameters for now
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file2' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--diff_files $file $file2
|
||||
--remove_file $file2
|
||||
|
||||
# now show the OUTFILE defaults are correct with NO_BACKSLASH_ESCAPES
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file2' FIELDS TERMINATED BY ' ' FROM t1
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--diff_files $file $file2
|
||||
--remove_file $file2
|
||||
|
||||
@ -435,9 +455,11 @@ INSERT INTO t1 (id, val1) VALUES (3, '\tx');
|
||||
--echo 1.1 NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' '
|
||||
@ -454,9 +476,11 @@ eval SELECT LOAD_FILE("$file") as exp;
|
||||
--echo 1.2 NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '\' TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '\' TERMINATED BY ' '
|
||||
@ -478,9 +502,11 @@ SET sql_mode = '';
|
||||
--echo 2.1 !NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' '
|
||||
@ -503,9 +529,11 @@ SET sql_mode = '';
|
||||
--echo 2.2 !NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '' TERMINATED BY ' '
|
||||
@ -547,9 +575,11 @@ INSERT INTO t1 VALUES (1);
|
||||
SET NAMES latin1;
|
||||
SET character_set_filesystem=filename;
|
||||
select @@character_set_filesystem;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT * INTO OUTFILE 't-1' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
DELETE FROM t1;
|
||||
LOAD DATA INFILE 't-1' INTO TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
@ -571,9 +601,11 @@ select @@character_set_filesystem;
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(col0 LONGBLOB);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT 'test' INTO OUTFILE 't1.txt';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
LOAD DATA INFILE 't1.txt' IGNORE INTO TABLE t1 SET col0=col0;
|
||||
SELECT * FROM t1;
|
||||
|
||||
@ -642,9 +674,11 @@ disconnect con1;
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(f1 INT);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--disable_warnings
|
||||
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
|
||||
--enable_warnings
|
||||
@ -661,7 +695,9 @@ remove_file $MYSQLD_DATADIR/test/t1.dat;
|
||||
--disable_ps2_protocol
|
||||
--let $file=$MYSQLTEST_VARDIR/tmp/bug11735141.txt
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--eval SELECT '1\n' INTO DUMPFILE '$file'
|
||||
--enable_cursor_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
create table t1(a point);
|
||||
@ -749,9 +785,11 @@ CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b));
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
CREATE TABLE t2 (c INT);
|
||||
CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT a, b INTO OUTFILE '15645.data' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--error ER_WRONG_USAGE
|
||||
LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b);
|
||||
--error ER_WRONG_USAGE
|
||||
|
Reference in New Issue
Block a user