17
17
# This breaks vpath builds - and I don't care enough about it to fix
18
18
# drizzletest. We can re-enable this in the new test system
19
#--exec $DRIZZLE test 2>&1 < "$DRIZZLE_TEST_DIR/t/mysql_delimiter.sql"
19
#--exec $MYSQL test 2>&1 < "$DRIZZLE_TEST_DIR/t/mysql_delimiter.sql"
21
21
--disable_query_log
22
22
# Test delimiter : supplied on the command line
23
23
select "Test delimiter : from command line" as "_";
24
--exec $DRIZZLE test --delimiter=":" -e "select * from t1:"
24
--exec $MYSQL test --delimiter=":" -e "select * from t1:"
25
25
# Test delimiter :; supplied on the command line
26
26
select "Test delimiter :; from command line" as "_";
27
--exec $DRIZZLE test --delimiter=":;" -e "select * from t1:;"
27
--exec $MYSQL test --delimiter=":;" -e "select * from t1:;"
28
28
# Test 'go' command (vertical output) \G
29
29
select "Test 'go' command(vertical output) \G" as "_";
30
--exec $DRIZZLE test -e "select * from t1\G"
30
--exec $MYSQL test -e "select * from t1\G"
31
31
# Test 'go' command \g
32
32
select "Test 'go' command \g" as "_";
33
--exec $DRIZZLE test -e "select * from t1\g"
33
--exec $MYSQL test -e "select * from t1\g"
38
# BUG9998 - MySQL client hangs on USE "database"
40
create table t1(a int);
42
--exec $MYSQL -e "use test; select database();"
38
47
# Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string".
40
#--exec $DRIZZLE -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1
49
#--exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1
43
52
# Bug#17939 Wrong table format when using UTF8 strings
45
--exec $DRIZZLE --table -e "SELECT 'John Doe' as '__tañgè Ñãmé'" 2>&1
46
--exec $DRIZZLE --table -e "SELECT '__tañgè Ñãmé' as 'John Doe'" 2>&1
54
--exec $MYSQL --table -e "SELECT 'John Doe' as '__tañgè Ñãmé'" 2>&1
55
--exec $MYSQL --table -e "SELECT '__tañgè Ñãmé' as 'John Doe'" 2>&1
49
58
# Bug#18265 -- mysql client: No longer right-justifies numeric columns
51
--exec $DRIZZLE -t test -e "create table t1 (i int, j int, k char(25)); insert into t1 (i) values (1); insert into t1 (k) values ('<----------------------->'); insert into t1 (k) values ('<-----'); insert into t1 (k) values ('Τη γλώσσα'); insert into t1 (k) values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;"
60
--exec $MYSQL -t test -e "create table t1 (i int, j int, k char(25)); insert into t1 (i) values (1); insert into t1 (k) values ('<----------------------->'); insert into t1 (k) values ('<-----'); insert into t1 (k) values ('Τη γλώσσα'); insert into t1 (k) values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;"
54
63
# "DESCRIBE" commands may return strange NULLness flags.
56
--exec $DRIZZLE test -e "create table t1 (i int, j int not null, k int); insert into t1 values (null, 1, null); select * from t1; describe t1; drop table t1;"
57
--exec $DRIZZLE -t test -e "create table t1 (i int, j int not null, k int); insert into t1 values (null, 1, null); select * from t1; describe t1; drop table t1;"
65
--exec $MYSQL test -e "create table t1 (i int, j int not null, k int); insert into t1 values (null, 1, null); select * from t1; describe t1; drop table t1;"
66
--exec $MYSQL -t test -e "create table t1 (i int, j int not null, k int); insert into t1 values (null, 1, null); select * from t1; describe t1; drop table t1;"
60
69
# Bug#19564: mysql displays NULL instead of space
62
--exec $DRIZZLE test -e "create table b19564 (i int, s1 char(1)); insert into b19564 values (1, 'x'); insert into b19564 values (2, NULL); insert into b19564 values (3, ' '); select * from b19564 order by i; drop table b19564;"
63
--exec $DRIZZLE -t test -e "create table b19564 (i int, s1 char(1)); insert into b19564 values (1, 'x'); insert into b19564 values (2, NULL); insert into b19564 values (3, ' '); select * from b19564 order by i; drop table b19564;"
71
--exec $MYSQL test -e "create table b19564 (i int, s1 char(1)); insert into b19564 values (1, 'x'); insert into b19564 values (2, NULL); insert into b19564 values (3, ' '); select * from b19564 order by i; drop table b19564;"
72
--exec $MYSQL -t test -e "create table b19564 (i int, s1 char(1)); insert into b19564 values (1, 'x'); insert into b19564 values (2, NULL); insert into b19564 values (3, ' '); select * from b19564 order by i; drop table b19564;"
66
75
# Bug#21618: NULL shown as empty string in client
68
--exec $DRIZZLE test -e "select unhex('zz');"
69
--exec $DRIZZLE -t test -e "select unhex('zz');"
77
--exec $MYSQL test -e "select unhex('zz');"
78
--exec $MYSQL -t test -e "select unhex('zz');"
71
80
# Bug#19265 describe command does not work from mysql prompt
74
83
create table t1(a int, b varchar(255), c int);
75
--exec $DRIZZLE test -e "desc t1"
76
--exec $DRIZZLE test -e "desc t1\g"
84
--exec $MYSQL test -e "desc t1"
85
--exec $MYSQL test -e "desc t1\g"
81
90
# Bug#21042 mysql client segfaults on importing a mysqldump export
83
#--error EE_ERROR_FIRST
84
#--exec $DRIZZLE test -e "connect verylongdatabasenamethatshouldblowthe256byteslongbufferincom_connectfunctionxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxendcccccccdxxxxxxxxxxxxxxxxxkskskskskkskskskskskskskskskskkskskskskkskskskskskskskskskend" 2>&1
93
#--exec $MYSQL test -e "connect verylongdatabasenamethatshouldblowthe256byteslongbufferincom_connectfunctionxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxendcccccccdxxxxxxxxxxxxxxxxxkskskskskkskskskskskskskskskskkskskskskkskskskskskskskskskend" 2>&1
92
101
# if the client sees the 'use' within the comment, we haven't fixed
93
--exec echo "/*" > $DRIZZLETEST_VARDIR/tmp/bug20432.sql
94
--exec echo "use" >> $DRIZZLETEST_VARDIR/tmp/bug20432.sql
95
--exec echo "*/" >> $DRIZZLETEST_VARDIR/tmp/bug20432.sql
96
--exec $DRIZZLE < $DRIZZLETEST_VARDIR/tmp/bug20432.sql 2>&1
102
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
103
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
104
--exec echo "*/" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
105
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
98
107
# SQL can have embedded comments => workie
99
--exec echo "select /*" > $DRIZZLETEST_VARDIR/tmp/bug20432.sql
100
--exec echo "use" >> $DRIZZLETEST_VARDIR/tmp/bug20432.sql
101
--exec echo "*/ 1" >> $DRIZZLETEST_VARDIR/tmp/bug20432.sql
102
--exec $DRIZZLE < $DRIZZLETEST_VARDIR/tmp/bug20432.sql 2>&1
108
--exec echo "select /*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
109
--exec echo "use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
110
--exec echo "*/ 1" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
111
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
104
113
# client commands on the other hand must be at BOL => error
105
--exec echo "/*" > $DRIZZLETEST_VARDIR/tmp/bug20432.sql
106
--exec echo "xxx" >> $DRIZZLETEST_VARDIR/tmp/bug20432.sql
107
--exec echo "*/ use" >> $DRIZZLETEST_VARDIR/tmp/bug20432.sql
108
--error EE_ERROR_FIRST
109
--exec $DRIZZLE < $DRIZZLETEST_VARDIR/tmp/bug20432.sql 2>&1
114
--exec echo "/*" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
115
--exec echo "xxx" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
116
--exec echo "*/ use" >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
118
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
111
120
# client comment recognized, but parameter missing => error
112
--exec echo "use" > $DRIZZLETEST_VARDIR/tmp/bug20432.sql
113
--exec $DRIZZLE < $DRIZZLETEST_VARDIR/tmp/bug20432.sql 2>&1
121
--exec echo "use" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
122
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
116
125
# Bug #20328: mysql client interprets commands in comments
118
#--exec $DRIZZLE -e "help" > $DRIZZLETEST_VARDIR/tmp/bug20328_1.result
119
#--exec $DRIZZLE -e "help " > $DRIZZLETEST_VARDIR/tmp/bug20328_2.result
120
#--diff_files $DRIZZLETEST_VARDIR/tmp/bug20328_1.result $DRIZZLETEST_VARDIR/tmp/bug20328_2.result
127
#--exec $MYSQL -e "help" > $MYSQLTEST_VARDIR/tmp/bug20328_1.result
128
#--exec $MYSQL -e "help " > $MYSQLTEST_VARDIR/tmp/bug20328_2.result
129
#--diff_files $MYSQLTEST_VARDIR/tmp/bug20328_1.result $MYSQLTEST_VARDIR/tmp/bug20328_2.result
123
132
# Bug #19216: Client crashes on long SELECT
165
174
--echo Test connect without db- or host-name => reconnect
166
--exec $DRIZZLE test -e "\r" 2>&1
167
--exec $DRIZZLE test -e "connect" 2>&1
175
--exec $MYSQL test -e "\r" 2>&1
176
--exec $MYSQL test -e "connect" 2>&1
169
178
--echo Test connect with dbname only => new dbname, old hostname
170
--exec $DRIZZLE test -e "\r test" 2>&1
171
--exec $DRIZZLE test -e "connect test" 2>&1
172
--exec $DRIZZLE test -e "\rtest" 2>&1
173
--error EE_ERROR_FIRST
174
--exec $DRIZZLE test -e "connecttest" 2>&1
179
--exec $MYSQL test -e "\r test" 2>&1
180
--exec $MYSQL test -e "connect test" 2>&1
181
--exec $MYSQL test -e "\rtest" 2>&1
183
--exec $MYSQL test -e "connecttest" 2>&1
176
185
--echo Test connect with _invalid_ dbname only => new invalid dbname, old hostname
177
--error EE_ERROR_FIRST
178
--exec $DRIZZLE test -e "\r invalid" 2>&1
179
--error EE_ERROR_FIRST
180
--exec $DRIZZLE test -e "connect invalid" 2>&1
187
--exec $MYSQL test -e "\r invalid" 2>&1
189
--exec $MYSQL test -e "connect invalid" 2>&1
182
191
--echo Test connect with dbname + hostname
183
#--exec $DRIZZLE test -e "\r test localhost" 2>&1
184
#--exec $DRIZZLE test -e "connect test localhost" 2>&1
192
#--exec $MYSQL test -e "\r test localhost" 2>&1
193
#--exec $MYSQL test -e "connect test localhost" 2>&1
186
195
--echo Test connect with dbname + _invalid_ hostname
187
196
# Mask the errno of the error message
188
197
#--replace_regex /\([0-9]*\)/(errno)/
189
#--error EE_ERROR_FIRST
190
#--exec $DRIZZLE test -e "\r test invalid_hostname" 2>&1
199
#--exec $MYSQL test -e "\r test invalid_hostname" 2>&1
191
200
#--replace_regex /\([0-9]*\)/(errno)/
192
#--error EE_ERROR_FIRST
193
#--exec $DRIZZLE test -e "connect test invalid_hostname" 2>&1
202
#--exec $MYSQL test -e "connect test invalid_hostname" 2>&1
195
204
#--echo The commands reported in the bug report
196
205
#--replace_regex /\([0-9]*\)/(errno)/
197
#--error EE_ERROR_FIRST
198
#--exec $DRIZZLE test -e "\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
207
#--exec $MYSQL test -e "\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
200
209
##--replace_regex /\([0-9]*\)/(errno)/
201
##--error EE_ERROR_FIRST
202
##--exec echo '\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | $DRIZZLE 2>&1
211
##--exec echo '\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | $MYSQL 2>&1
204
213
#--echo Too long dbname
205
#--error EE_ERROR_FIRST
206
#--exec $DRIZZLE test -e "\r test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx localhost" 2>&1
215
#--exec $MYSQL test -e "\r test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx localhost" 2>&1
208
217
#--echo Too long hostname
209
218
#--replace_regex /\([0-9]*\)/(errno)/
210
#--error EE_ERROR_FIRST
211
#--exec $DRIZZLE test -e "\r test cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
220
#--exec $MYSQL test -e "\r test cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
271
280
# Bug#26780: patch to add auto vertical output option to the cli.
273
282
# Make this wide enough that it will wrap almost everywhere.
274
#--exec $DRIZZLE test --auto-vertical-output --table -e "SELECT 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0;"
283
#--exec $MYSQL test --auto-vertical-output --table -e "SELECT 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0;"
275
284
# Too short to wrap.
276
#--exec $DRIZZLE test --auto-vertical-output --table -e "SELECT 1;"
285
#--exec $MYSQL test --auto-vertical-output --table -e "SELECT 1;"
278
287
--echo End of tests