~vadim-tk/percona-server/percona-galera-5.1.57

« back to all changes in this revision

Viewing changes to mysql-test/r/mysql.result

  • Committer: root
  • Date: 2011-07-10 16:09:24 UTC
  • Revision ID: root@r815.office.percona.com-20110710160924-fyffqsbaclgu6vui
Initial port

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1;
 
2
create table t1(a int);
 
3
insert into t1 values(1);
 
4
ERROR at line 9: DELIMITER must be followed by a 'delimiter' character or string
 
5
 
 
6
Test default delimiter ;
 
7
a
 
8
1
 
9
 
 
10
Test delimiter without arg
 
11
 
 
12
Test delimiter :
 
13
a
 
14
1
 
15
 
 
16
Test delimiter :
 
17
a
 
18
1
 
19
 
 
20
Test delimiter :;
 
21
a
 
22
1
 
23
 
 
24
Test delimiter //
 
25
a
 
26
1
 
27
 
 
28
Test delimiter MySQL
 
29
a
 
30
1
 
31
 
 
32
Test delimiter delimiter
 
33
a
 
34
1
 
35
Tables_in_test
 
36
t1
 
37
t2
 
38
t3
 
39
Tables_in_test
 
40
t1
 
41
_
 
42
Test delimiter : from command line
 
43
a
 
44
1
 
45
_
 
46
Test delimiter :; from command line
 
47
a
 
48
1
 
49
_
 
50
Test 'go' command(vertical output) G
 
51
*************************** 1. row ***************************
 
52
a: 1
 
53
_
 
54
Test  'go' command g
 
55
a
 
56
1
 
57
drop table t1;
 
58
create table t1(a int);
 
59
lock tables t1 write;
 
60
database()
 
61
test
 
62
unlock tables;
 
63
drop table t1;
 
64
+----------------------+------------+--------+
 
65
| concat('>',col1,'<') | col2       | col3   |
 
66
+----------------------+------------+--------+
 
67
| >a   <               | b          | 123421 |
 
68
| >a   <               | 0123456789 |      4 |
 
69
| >abcd<               |            |      4 |
 
70
+----------------------+------------+--------+
 
71
+-------------------+
 
72
| __tañgè Ñãmé      |
 
73
+-------------------+
 
74
| John Doe          |
 
75
+-------------------+
 
76
+-------------------+
 
77
| John Doe          |
 
78
+-------------------+
 
79
| __tañgè Ñãmé      |
 
80
+-------------------+
 
81
+------+------+---------------------------+
 
82
| i    | j    | k                         |
 
83
+------+------+---------------------------+
 
84
|    1 | NULL | NULL                      |
 
85
| NULL | NULL | <-----------------------> |
 
86
| NULL | NULL | <-----                    |
 
87
| NULL | NULL | Τη γλώσσα                 |
 
88
| NULL | NULL | ᛖᚴ ᚷᛖᛏ                    |
 
89
+------+------+---------------------------+
 
90
i       j       k
 
91
NULL    1       NULL
 
92
Field   Type    Null    Key     Default Extra
 
93
i       int(11) YES             NULL    
 
94
j       int(11) NO              NULL    
 
95
k       int(11) YES             NULL    
 
96
+------+---+------+
 
97
| i    | j | k    |
 
98
+------+---+------+
 
99
| NULL | 1 | NULL |
 
100
+------+---+------+
 
101
+-------+---------+------+-----+---------+-------+
 
102
| Field | Type    | Null | Key | Default | Extra |
 
103
+-------+---------+------+-----+---------+-------+
 
104
| i     | int(11) | YES  |     | NULL    |       |
 
105
| j     | int(11) | NO   |     | NULL    |       |
 
106
| k     | int(11) | YES  |     | NULL    |       |
 
107
+-------+---------+------+-----+---------+-------+
 
108
i       s1
 
109
1       x
 
110
2       NULL
 
111
3       
 
112
+------+------+
 
113
| i    | s1   |
 
114
+------+------+
 
115
|    1 | x    |
 
116
|    2 | NULL |
 
117
|    3 |      |
 
118
+------+------+
 
119
unhex('zz')
 
120
NULL
 
121
+-------------+
 
122
| unhex('zz') |
 
123
+-------------+
 
124
| NULL        |
 
125
+-------------+
 
126
create table t1(a int, b varchar(255), c int);
 
127
Field   Type    Null    Key     Default Extra
 
128
a       int(11) YES             NULL    
 
129
b       varchar(255)    YES             NULL    
 
130
c       int(11) YES             NULL    
 
131
Field   Type    Null    Key     Default Extra
 
132
a       int(11) YES             NULL    
 
133
b       varchar(255)    YES             NULL    
 
134
c       int(11) YES             NULL    
 
135
drop table t1;
 
136
1
 
137
1
 
138
ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
 
139
ERROR at line 1: USE must be followed by a database name
 
140
\
 
141
\\
 
142
';
 
143
';
 
144
create table t17583 (a int);
 
145
insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
 
146
insert into t17583 select a from t17583;
 
147
insert into t17583 select a from t17583;
 
148
insert into t17583 select a from t17583;
 
149
insert into t17583 select a from t17583;
 
150
insert into t17583 select a from t17583;
 
151
insert into t17583 select a from t17583;
 
152
insert into t17583 select a from t17583;
 
153
select count(*) from t17583;
 
154
count(*)
 
155
1280
 
156
drop table t17583;
 
157
Test connect without db- or host-name => reconnect
 
158
Test connect with dbname only => new dbname, old hostname
 
159
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connecttest' at line 1
 
160
Test connect with _invalid_ dbname only => new invalid dbname, old hostname
 
161
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
 
162
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
 
163
Test connect with dbname + hostname
 
164
Test connect with dbname + _invalid_ hostname
 
165
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
 
166
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
 
167
The commands reported in the bug report
 
168
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
 
169
Too long dbname
 
170
ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
 
171
Too long hostname
 
172
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
 
173
1
 
174
1
 
175
ERROR at line 1: DELIMITER cannot contain a backslash character
 
176
ERROR at line 1: DELIMITER cannot contain a backslash character
 
177
1
 
178
1
 
179
1
 
180
1
 
181
This is a file starting with UTF8 BOM 0xEFBBBF
 
182
This is a file starting with UTF8 BOM 0xEFBBBF
 
183
delimiter
 
184
1
 
185
2
 
186
2
 
187
2
 
188
2
 
189
@z:='1' @z=database()
 
190
1       NULL
 
191
1
 
192
1
 
193
1
 
194
1
 
195
COUNT (*)
 
196
1
 
197
COUNT (*)
 
198
1
 
199
COUNT (*)
 
200
1
 
201
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
 
202
End of 5.0 tests
 
203
WARNING: --server-arg option not supported in this configuration.
 
204
Warning (Code 1286): Unknown table engine 'nonexistent'
 
205
Warning (Code 1266): Using storage engine MyISAM for table 't2'
 
206
Warning (Code 1286): Unknown table engine 'nonexistent2'
 
207
Warning (Code 1266): Using storage engine MyISAM for table 't2'
 
208
Error (Code 1050): Table 't2' already exists
 
209
drop tables t1, t2;
 
210
<TABLE BORDER=1><TR><TH>&lt;</TH></TR><TR><TD>&lt; &amp; &gt;</TD></TR></TABLE>create table t1 (a char(5));
 
211
insert into t1 values ('\0b\0');
 
212
a
 
213
\0b\0
 
214
a
 
215
\0b\0
 
216
+------+
 
217
| a    |
 
218
+------+
 
219
|  b   |
 
220
+------+
 
221
*************************** 1. row ***************************
 
222
a:  b 
 
223
<TABLE BORDER=1><TR><TH>a</TH></TR><TR><TD> b </TD></TR></TABLE><?xml version="1.0"?>
 
224
 
 
225
<resultset statement="select a from t1
 
226
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
227
  <row>
 
228
        <field name="a"> b </field>
 
229
  </row>
 
230
</resultset>
 
231
drop table t1;
 
232
 
 
233
Bug #47147: mysql client option --skip-column-names does not apply to vertical output
 
234
 
 
235
*************************** 1. row ***************************
 
236
1
 
237
 
 
238
#
 
239
# Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE 
 
240
#             commands.
 
241
#
 
242
CREATE DATABASE connected_db;
 
243
USE connected_db;
 
244
SHOW TABLES;
 
245
Tables_in_connected_db
 
246
table_in_connected_db
 
247
DROP DATABASE connected_db;
 
248
 
 
249
#
 
250
# Testing --one-database option
 
251
#
 
252
CREATE DATABASE connected_db;
 
253
SHOW TABLES IN connected_db;
 
254
Tables_in_connected_db
 
255
t1
 
256
SHOW TABLES IN test;
 
257
Tables_in_test
 
258
t1
 
259
USE test;
 
260
DROP TABLE t1;
 
261
DROP DATABASE connected_db;
 
262
 
 
263
SHOW TABLES IN test;
 
264
Tables_in_test
 
265
SHOW TABLES IN test1;
 
266
Tables_in_test1
 
267
DROP DATABASE test1;
 
268
 
 
269
#
 
270
# Checking --one-database option followed by the execution of 
 
271
# connect command.
 
272
#
 
273
CREATE DATABASE connected_db;
 
274
SHOW TABLES IN connected_db;
 
275
Tables_in_connected_db
 
276
t1
 
277
t2
 
278
SHOW TABLES IN test;
 
279
Tables_in_test
 
280
t1
 
281
t2
 
282
DROP TABLE test.t1;
 
283
DROP TABLE test.t2;
 
284
DROP DATABASE connected_db;
 
285
 
 
286
#
 
287
# Checking --one-database option with no database specified
 
288
# at command-line.
 
289
#
 
290
SHOW TABLES IN test;
 
291
Tables_in_test
 
292
 
 
293
#
 
294
# Checking --one-database option with non_existent_db 
 
295
# specified with USE command
 
296
#
 
297
CREATE DATABASE connected_db;
 
298
SHOW TABLES IN connected_db;
 
299
Tables_in_connected_db
 
300
table_in_connected_db
 
301
 
 
302
SHOW TABLES IN connected_db;
 
303
Tables_in_connected_db
 
304
table_in_connected_db
 
305
DROP DATABASE connected_db;
 
306
 
 
307
End of tests