~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/drizzle_client.test

  • Committer: Monty Taylor
  • Date: 2010-10-15 17:18:02 UTC
  • mto: (1859.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1860.
  • Revision ID: mordred@inaugust.com-20101015171802-qhk6zyfhrkvprr1n
Added support for registering regular sys_var instances via module::Context.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
insert into t1 values(1);
15
15
 
16
16
# Test delimiters
17
 
--exec $MYSQL test 2>&1 < "./t/mysql_delimiter.sql"
 
17
# This breaks vpath builds - and I don't care enough about it to fix
 
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"
18
20
 
19
21
--disable_query_log
20
22
# Test delimiter : supplied on the command line
21
23
select "Test delimiter : from command line" as "_";
22
 
--exec $MYSQL test --delimiter=":" -e "select * from t1:"
 
24
--exec $DRIZZLE test --delimiter=":" -e "select * from t1:"
23
25
# Test delimiter :; supplied on the command line
24
26
select "Test delimiter :; from command line" as "_";
25
 
--exec $MYSQL test --delimiter=":;" -e "select * from t1:;"
 
27
--exec $DRIZZLE test --delimiter=":;" -e "select * from t1:;"
26
28
# Test 'go' command (vertical output) \G
27
29
select "Test 'go' command(vertical output) \G" as "_";
28
 
--exec $MYSQL test -e "select * from t1\G"
 
30
--exec $DRIZZLE test -e "select * from t1\G"
29
31
# Test 'go' command \g
30
32
select "Test  'go' command \g" as "_";
31
 
--exec $MYSQL test -e "select * from t1\g"
 
33
--exec $DRIZZLE test -e "select * from t1\g"
32
34
--enable_query_log
33
35
drop table t1;
34
36
 
35
37
#
36
 
# BUG9998 - MySQL client hangs on USE "database"
37
 
#
38
 
create table t1(a int);
39
 
lock tables t1 write;
40
 
--exec $MYSQL -e "use test; select database();"
41
 
unlock tables;
42
 
drop table t1;
43
 
 
44
 
#
45
38
# Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string".
46
39
#
47
 
--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
 
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
48
41
 
49
42
#
50
43
# Bug#17939 Wrong table format when using UTF8 strings
51
44
#
52
 
--exec $MYSQL --default-character-set=utf8 --table -e "SELECT 'John Doe' as '__tañgè Ñãmé'" 2>&1
53
 
--exec $MYSQL --default-character-set=utf8 --table -e "SELECT '__tañgè Ñãmé' as 'John Doe'" 2>&1
 
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
47
 
55
48
#
56
49
# Bug#18265 -- mysql client: No longer right-justifies numeric columns
57
50
#
58
 
--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int, k char(25) charset utf8); 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;"
 
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;"
59
52
 
60
53
#
61
54
# "DESCRIBE" commands may return strange NULLness flags.
62
55
#
63
 
--exec $MYSQL --default-character-set utf8 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;"
64
 
--exec $MYSQL -t --default-character-set utf8 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;"
 
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
58
 
66
59
#
67
60
# Bug#19564: mysql displays NULL instead of space
68
61
#
69
 
--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;" 
70
 
--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;" 
 
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
64
 
72
65
#
73
66
# Bug#21618: NULL shown as empty string in client
74
67
#
75
 
--exec $MYSQL test -e "select unhex('zz');" 
76
 
--exec $MYSQL -t test -e "select unhex('zz');" 
 
68
--exec $DRIZZLE test -e "select unhex('zz');" 
 
69
--exec $DRIZZLE -t test -e "select unhex('zz');" 
77
70
 
78
71
# Bug#19265 describe command does not work from mysql prompt
79
72
#
80
73
 
81
74
create table t1(a int, b varchar(255), c int);
82
 
--exec $MYSQL test -e "desc t1"
83
 
--exec $MYSQL test -e "desc t1\g"
 
75
--exec $DRIZZLE test -e "desc t1"
 
76
--exec $DRIZZLE test -e "desc t1\g"
84
77
drop table t1;
85
78
 
86
 
--disable_parsing
 
79
#--disable_parsing
87
80
#
88
81
# Bug#21042     mysql client segfaults on importing a mysqldump export
89
82
#
90
 
--error 1
91
 
--exec $MYSQL test -e "connect verylongdatabasenamethatshouldblowthe256byteslongbufferincom_connectfunctionxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxendcccccccdxxxxxxxxxxxxxxxxxkskskskskkskskskskskskskskskskkskskskskkskskskskskskskskskend" 2>&1
92
 
--enable_parsing
 
83
#--error 1
 
84
#--exec $DRIZZLE test -e "connect verylongdatabasenamethatshouldblowthe256byteslongbufferincom_connectfunctionxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxkxendcccccccdxxxxxxxxxxxxxxxxxkskskskskkskskskskskskskskskskkskskskskkskskskskskskskskskend" 2>&1
 
85
#--enable_parsing
93
86
 
94
87
 
95
88
#
97
90
#
98
91
 
99
92
# if the client sees the 'use' within the comment, we haven't fixed
100
 
--exec echo "/*"          >  $MYSQLTEST_VARDIR/tmp/bug20432.sql
101
 
--exec echo "use"         >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
102
 
--exec echo "*/"          >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
103
 
--exec $MYSQL              < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
 
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
104
97
 
105
98
# SQL can have embedded comments => workie
106
 
--exec echo "select /*"   >  $MYSQLTEST_VARDIR/tmp/bug20432.sql
107
 
--exec echo "use"         >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
108
 
--exec echo "*/ 1"        >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
109
 
--exec $MYSQL              < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
 
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
110
103
 
111
104
# client commands on the other hand must be at BOL => error
112
 
--exec echo "/*"          >  $MYSQLTEST_VARDIR/tmp/bug20432.sql
113
 
--exec echo "xxx"         >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
114
 
--exec echo "*/ use"      >> $MYSQLTEST_VARDIR/tmp/bug20432.sql
 
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
115
108
--error 1
116
 
--exec $MYSQL              < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
 
109
--exec $DRIZZLE              < $DRIZZLETEST_VARDIR/tmp/bug20432.sql 2>&1
117
110
 
118
111
# client comment recognized, but parameter missing => error
119
 
--exec echo "use"         >  $MYSQLTEST_VARDIR/tmp/bug20432.sql
120
 
--exec $MYSQL              < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
 
112
--exec echo "use"         >  $DRIZZLETEST_VARDIR/tmp/bug20432.sql
 
113
--exec $DRIZZLE              < $DRIZZLETEST_VARDIR/tmp/bug20432.sql 2>&1
121
114
 
122
115
#
123
116
# Bug #20328: mysql client interprets commands in comments
124
117
#
125
 
--exec $MYSQL -e "help" > $MYSQLTEST_VARDIR/tmp/bug20328_1.result
126
 
--exec $MYSQL -e "help " > $MYSQLTEST_VARDIR/tmp/bug20328_2.result
127
 
--diff_files $MYSQLTEST_VARDIR/tmp/bug20328_1.result $MYSQLTEST_VARDIR/tmp/bug20328_2.result
 
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
128
121
 
129
122
#
130
123
# Bug #19216: Client crashes on long SELECT
133
126
# - 3400 * 20 makes 68000 columns that is more than the
134
127
#   max number that can fit in a 16 bit number.
135
128
 
136
 
--perl
137
 
open(FILE,">","$ENV{'MYSQLTEST_VARDIR'}/tmp/b19216.tmp") or die;
138
 
print FILE "select\n";
139
 
print FILE "'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',\n" x 3400;
140
 
print FILE "'b';\n";
141
 
close FILE;
142
 
EOF
143
 
 
144
 
--disable_query_log
145
 
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/b19216.tmp >/dev/null
146
 
--enable_query_log
147
 
 
148
 
--remove_file $MYSQLTEST_VARDIR/tmp/b19216.tmp
149
 
 
150
 
#
151
 
# Bug #20103: Escaping with backslash does not work
152
 
#
153
 
--exec echo "SET SQL_MODE = 'NO_BACKSLASH_ESCAPES';"  > $MYSQLTEST_VARDIR/tmp/bug20103.sql
154
 
--exec echo "SELECT '\';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
155
 
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
156
 
 
157
 
--exec echo "SET SQL_MODE = '';"  > $MYSQLTEST_VARDIR/tmp/bug20103.sql
158
 
--exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
159
 
--exec $MYSQL              < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
 
129
#--perl
 
130
#open(FILE,">","$ENV{'DRIZZLETEST_VARDIR'}/tmp/b19216.tmp") or die;
 
131
#print FILE "select\n";
 
132
#print FILE "'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',\n" x 3400;
 
133
#print FILE "'b';\n";
 
134
#close FILE;
 
135
#EOF
 
136
 
 
137
#--disable_query_log
 
138
#--exec $DRIZZLE < $DRIZZLETEST_VARDIR/tmp/b19216.tmp >/dev/null
 
139
#--enable_query_log
 
140
#
 
141
#--remove_file $DRIZZLETEST_VARDIR/tmp/b19216.tmp
160
142
 
161
143
#
162
144
# Bug#17583: mysql drops connection when stdout is not writable
172
154
insert into t17583 select a from t17583;
173
155
# Close to the minimal data needed to exercise bug.
174
156
select count(*) from t17583;
175
 
--exec echo "select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; " |$MYSQL test >&-
 
157
--exec echo "select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; " |$DRIZZLE test >&-
176
158
drop table t17583;
177
159
 
178
160
#
181
163
#
182
164
#
183
165
--echo Test connect without db- or host-name => reconnect
184
 
--exec $MYSQL test -e "\r" 2>&1
185
 
--exec $MYSQL test -e "connect" 2>&1
 
166
--exec $DRIZZLE test -e "\r" 2>&1
 
167
--exec $DRIZZLE test -e "connect" 2>&1
186
168
 
187
169
--echo Test connect with dbname only => new dbname, old hostname
188
 
--exec $MYSQL test -e "\r test" 2>&1
189
 
--exec $MYSQL test -e "connect test" 2>&1
190
 
--exec $MYSQL test -e "\rtest" 2>&1
 
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
191
173
--error 1
192
 
--exec $MYSQL test -e "connecttest" 2>&1
 
174
--exec $DRIZZLE test -e "connecttest" 2>&1
193
175
 
194
176
--echo Test connect with _invalid_ dbname only => new invalid dbname, old hostname
195
177
--error 1
196
 
--exec $MYSQL test -e "\r invalid" 2>&1
 
178
--exec $DRIZZLE test -e "\r invalid" 2>&1
197
179
--error 1
198
 
--exec $MYSQL test -e "connect invalid" 2>&1
 
180
--exec $DRIZZLE test -e "connect invalid" 2>&1
199
181
 
200
182
--echo Test connect with dbname + hostname
201
 
--exec $MYSQL test -e "\r test localhost" 2>&1
202
 
--exec $MYSQL test -e "connect test localhost" 2>&1
 
183
#--exec $DRIZZLE test -e "\r test localhost" 2>&1
 
184
#--exec $DRIZZLE test -e "connect test localhost" 2>&1
203
185
 
204
186
--echo Test connect with dbname + _invalid_ hostname
205
187
# Mask the errno of the error message
206
 
--replace_regex /\([0-9]*\)/(errno)/
207
 
--error 1
208
 
--exec $MYSQL test -e "\r test invalid_hostname" 2>&1
209
 
--replace_regex /\([0-9]*\)/(errno)/
210
 
--error 1
211
 
--exec $MYSQL test -e "connect test invalid_hostname" 2>&1
212
 
 
213
 
--echo The commands reported in the bug report
214
 
--replace_regex /\([0-9]*\)/(errno)/
215
 
--error 1
216
 
--exec $MYSQL test -e "\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
217
 
 
218
 
#--replace_regex /\([0-9]*\)/(errno)/
219
 
#--error 1
220
 
#--exec echo '\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | $MYSQL 2>&1
221
 
 
222
 
--echo Too long dbname
223
 
--error 1
224
 
--exec $MYSQL test -e "\r test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx localhost" 2>&1
225
 
 
226
 
--echo Too long hostname
227
 
--replace_regex /\([0-9]*\)/(errno)/
228
 
--error 1
229
 
--exec $MYSQL test -e "\r  test cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
 
188
#--replace_regex /\([0-9]*\)/(errno)/
 
189
#--error 1
 
190
#--exec $DRIZZLE test -e "\r test invalid_hostname" 2>&1
 
191
#--replace_regex /\([0-9]*\)/(errno)/
 
192
#--error 1
 
193
#--exec $DRIZZLE test -e "connect test invalid_hostname" 2>&1
 
194
 
 
195
#--echo The commands reported in the bug report
 
196
#--replace_regex /\([0-9]*\)/(errno)/
 
197
#--error 1
 
198
#--exec $DRIZZLE test -e "\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
 
199
#
 
200
##--replace_regex /\([0-9]*\)/(errno)/
 
201
##--error 1
 
202
##--exec echo '\r\r\n\r\n cyril\ has\ found\ a\ bug\ :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | $DRIZZLE 2>&1
 
203
#
 
204
#--echo Too long dbname
 
205
#--error 1
 
206
#--exec $DRIZZLE test -e "\r test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx localhost" 2>&1
 
207
#
 
208
#--echo Too long hostname
 
209
#--replace_regex /\([0-9]*\)/(errno)/
 
210
#--error 1
 
211
#--exec $DRIZZLE test -e "\r  test cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
230
212
 
231
213
 
232
214
#
235
217
#
236
218
 
237
219
# This should work just fine...
238
 
--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
239
 
DELIMITER /
240
 
SELECT 1/
241
 
EOF
242
 
--exec $MYSQL             < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
243
 
remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
244
 
 
245
 
# This should give an error...
246
 
--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
247
 
DELIMITER \
248
 
EOF
249
 
--exec $MYSQL             < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
250
 
remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
251
 
 
252
 
# As should this...
253
 
--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
254
 
DELIMITER \\
255
 
EOF
256
 
--exec $MYSQL             < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
257
 
remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
258
 
 
 
220
#--write_file $DRIZZLETEST_VARDIR/tmp/bug21412.sql
 
221
#DELIMITER /
 
222
#SELECT 1/
 
223
#EOF
 
224
#--exec $DRIZZLE             < $DRIZZLETEST_VARDIR/tmp/bug21412.sql 2>&1
 
225
#remove_file $DRIZZLETEST_VARDIR/tmp/bug21412.sql;
 
226
#
 
227
## This should give an error...
 
228
#--write_file $DRIZZLETEST_VARDIR/tmp/bug21412.sql
 
229
#DELIMITER \
 
230
#EOF
 
231
#--exec $DRIZZLE             < $DRIZZLETEST_VARDIR/tmp/bug21412.sql 2>&1
 
232
#remove_file $DRIZZLETEST_VARDIR/tmp/bug21412.sql;
 
233
#
 
234
## As should this...
 
235
#--write_file $DRIZZLETEST_VARDIR/tmp/bug21412.sql
 
236
#DELIMITER \\
 
237
#EOF
 
238
#--exec $DRIZZLE             < $DRIZZLETEST_VARDIR/tmp/bug21412.sql 2>&1
 
239
#remove_file $DRIZZLETEST_VARDIR/tmp/bug21412.sql;
 
240
#
259
241
#
260
242
# Some coverage of not normally used parts
261
243
#
262
244
 
263
245
--disable_query_log
264
 
--exec $MYSQL test -e "show status" 2>&1 > /dev/null
265
 
--exec $MYSQL --help 2>&1 > /dev/null
266
 
--exec $MYSQL --version 2>&1 > /dev/null
 
246
#--exec $DRIZZLE test -e "show status" 2>&1 > /dev/null
 
247
--exec $DRIZZLE --help 2>&1 > /dev/null
 
248
--exec $DRIZZLE --version 2>&1 > /dev/null
267
249
--enable_query_log
268
250
 
269
251
#
271
253
#
272
254
 
273
255
# allow error 7(invalid argument) since --pager does not always exist in mysql
274
 
--error 0,7
275
 
--exec $MYSQL --pager="540bytelengthstringxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "select 1" > /dev/null 2>&1
276
 
--exec $MYSQL --character-sets-dir="540bytelengthstringxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "select 1" 2>&1
277
 
 
278
 
#
279
 
# bug #30164: Using client side macro inside server side comments generates broken queries
280
 
#
281
 
--exec $MYSQL test -e "/*! \C latin1 */ select 1;"
 
256
--error 0,1,7
 
257
--exec $DRIZZLE --pager="540bytelengthstringxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "select 1" > /dev/null 2>&1
282
258
 
283
259
#
284
260
# Bug#29323 mysql client only accetps ANSI encoded files
285
261
#
286
 
--write_file $MYSQLTEST_VARDIR/tmp/bug29323.sql
287
 
select "This is a file starting with UTF8 BOM 0xEFBBBF";
288
 
EOF
289
 
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29323.sql 2>&1
290
 
remove_file $MYSQLTEST_VARDIR/tmp/bug29323.sql;
 
262
#--write_file $DRIZZLETEST_VARDIR/tmp/bug29323.sql
 
263
#select "This is a file starting with UTF8 BOM 0xEFBBBF";
 
264
#EOF
 
265
#--exec $DRIZZLE < $DRIZZLETEST_VARDIR/tmp/bug29323.sql 2>&1
 
266
#remove_file $DRIZZLETEST_VARDIR/tmp/bug29323.sql;
291
267
 
292
268
--echo End of 5.0 tests
293
269
 
294
270
#
295
 
# Bug #29903: The CMake build method does not produce the embedded library.
296
 
#
297
 
--disable_query_log
298
 
--exec $MYSQL --server-arg=no-defaults test -e "quit"
299
 
--enable_query_log
300
 
 
301
 
#
302
271
# Bug#26780: patch to add auto vertical output option to the cli.
303
272
#
304
273
# Make this wide enough that it will wrap almost everywhere.
305
 
--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;"
 
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;"
306
275
# Too short to wrap.
307
 
--exec $MYSQL test --auto-vertical-output --table -e "SELECT 1;"
308
 
 
309
 
#
310
 
# Bug #25146: Some warnings/errors not shown when using --show-warnings
311
 
#
312
 
 
313
 
# This one should succeed with no warnings
314
 
--exec $MYSQL --show-warnings test -e "create table t1 (id int)"
315
 
 
316
 
# This should succeed, with warnings about conversion from nonexistent engine
317
 
--exec $MYSQL --show-warnings test -e "create table t2 (id int) engine=nonexistent"
318
 
 
319
 
# This should fail, with warnings as well
320
 
--error 1
321
 
--exec $MYSQL --show-warnings test -e "create table t2 (id int) engine=nonexistent2"
322
 
 
323
 
drop tables t1, t2;
 
276
#--exec $DRIZZLE test --auto-vertical-output --table -e "SELECT 1;"
324
277
 
325
278
--echo End of tests