13
13
--let $clauses=FIELDS TERMINATED BY 'raker'
14
--echo # $clauses, warning:
14
--echo # $clauses, error:
16
16
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
17
--error ER_AMBIGUOUS_FIELD_TERM
17
18
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
18
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
19
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
20
--eval CREATE TABLE t2 SELECT $fields FROM t1
21
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
22
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
23
--eval SELECT $fields FROM t2
24
--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
27
20
--let $fields=i1, i2
28
21
--let $clauses=FIELDS TERMINATED BY 'r'
44
37
--echo # $clauses, warning:
46
39
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
40
--error ER_AMBIGUOUS_FIELD_TERM
47
41
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
48
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
49
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
50
--eval CREATE TABLE t2 SELECT $fields FROM t1
51
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
52
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
53
--eval SELECT $fields FROM t2
54
--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
58
44
--let $clauses=FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY '0'
59
45
--echo # $clauses, warning:
61
47
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
48
--error ER_AMBIGUOUS_FIELD_TERM
62
49
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
63
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
64
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt')
51
# Drizzle bug (not filed, fixed): assert on file not found
65
52
--eval CREATE TABLE t2 SELECT $fields FROM t1
66
53
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
54
--error ER_FILE_NOT_FOUND
67
55
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' INTO TABLE t2 $clauses
68
--eval SELECT $fields FROM t2
69
--remove_file $MYSQLTEST_VARDIR/tmp/bug31663.txt
72
58
--let $fields=c1, c2
90
76
--echo # Bug#32533: SELECT INTO OUTFILE never escapes multibyte character
93
CREATE TABLE t1 (c1 VARCHAR(256));
94
INSERT INTO t1 VALUES (0xC3);
95
SELECT HEX(c1) FROM t1;
97
--let $file=$MYSQLTEST_VARDIR/tmp/bug32533.txt
99
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
100
--eval SELECT * INTO OUTFILE '$file' FIELDS ENCLOSED BY 0xC3 FROM t1
103
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
104
--eval SELECT HEX(LOAD_FILE('$file'))
106
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
107
--eval LOAD DATA INFILE '$file' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3
108
SELECT HEX(c1) FROM t1;
79
# Disabled due to https://bugs.launchpad.net/mysql-server/+bug/308457
81
#CREATE TABLE t1 (c1 VARCHAR(256));
82
#INSERT INTO t1 (c1) VALUES ('☠');
83
#SELECT HEX(c1) FROM t1;
85
#--let $file=$MYSQLTEST_VARDIR/tmp/bug32533.txt
87
#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
88
#--eval SELECT * INTO OUTFILE '$file' FIELDS ENCLOSED BY '☢' FROM t1
91
#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
92
#--eval SELECT HEX(LOAD_FILE('$file'))
94
#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
95
#--eval LOAD DATA INFILE '$file' INTO TABLE t1 FIELDS ENCLOSED BY '☢'
96
#SELECT HEX(c1) FROM t1;
113
101
--echo # End of 5.0 tests.