2005-05-17 21:14:01 +02:00
drop table if exists t1;
create table t1(a int);
insert into t1 values(1);
2005-10-06 16:54:43 +02:00
ERROR at line 9: DELIMITER must be followed by a 'delimiter' character or string
2005-05-17 21:14:01 +02:00
Test default delimiter ;
a
1
Test delimiter without arg
Test delimiter :
a
1
Test delimiter :
a
1
Test delimiter :;
a
1
Test delimiter //
a
1
Test delimiter MySQL
a
1
Test delimiter delimiter
a
1
2005-08-09 21:17:28 +02:00
Tables_in_test
t1
t2
t3
2006-11-22 07:27:06 +01:00
Tables_in_test
t1
2006-07-17 12:22:21 +02:00
_
2005-05-17 21:14:01 +02:00
Test delimiter : from command line
a
1
2006-07-17 12:22:21 +02:00
_
2005-05-17 21:14:01 +02:00
Test delimiter :; from command line
a
1
2006-07-17 12:22:21 +02:00
_
2005-05-17 21:14:01 +02:00
Test 'go' command(vertical output) G
*************************** 1. row ***************************
a: 1
2006-07-17 12:22:21 +02:00
_
2005-05-17 21:14:01 +02:00
Test 'go' command g
a
1
drop table t1;
2005-06-03 15:29:05 +02:00
create table t1(a int);
lock tables t1 write;
database()
test
unlock tables;
drop table t1;
2006-03-03 22:26:38 +01:00
+----------------------+------------+--------+
| concat('>',col1,'<') | col2 | col3 |
+----------------------+------------+--------+
2006-04-04 23:35:07 +02:00
| >a < | b | 123421 |
| >a < | 0123456789 | 4 |
2006-05-10 04:35:51 +02:00
| >abcd< | | 4 |
2006-03-03 22:26:38 +01:00
+----------------------+------------+--------+
2006-09-06 07:06:03 +02:00
+-------------------+
| __tañgè Ñãmé |
+-------------------+
| John Doe |
+-------------------+
+-------------------+
| John Doe |
+-------------------+
| __tañgè Ñãmé |
+-------------------+
2006-04-04 23:35:07 +02:00
+------+------+---------------------------+
| i | j | k |
+------+------+---------------------------+
| 1 | NULL | NULL |
| NULL | NULL | <-----------------------> |
| NULL | NULL | <----- |
| NULL | NULL | Τη γλώσσα |
| NULL | NULL | ᛖᚴ ᚷᛖᛏ |
+------+------+---------------------------+
2006-09-13 17:41:41 +02:00
i j k
NULL 1 NULL
Field Type Null Key Default Extra
i int(11) YES NULL
2007-09-20 10:54:46 +02:00
j int(11) NO NULL
2006-09-13 17:41:41 +02:00
k int(11) YES NULL
2006-04-16 23:17:36 +02:00
+------+---+------+
| i | j | k |
+------+---+------+
| NULL | 1 | NULL |
+------+---+------+
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| i | int(11) | YES | | NULL | |
2007-09-20 10:54:46 +02:00
| j | int(11) | NO | | NULL | |
2006-04-16 23:17:36 +02:00
| k | int(11) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+
2006-09-13 17:41:41 +02:00
i s1
1 x
2 NULL
3
2006-05-10 04:35:51 +02:00
+------+------+
| i | s1 |
+------+------+
| 1 | x |
| 2 | NULL |
| 3 | |
+------+------+
2006-09-13 17:41:41 +02:00
unhex('zz')
NULL
+-------------+
| unhex('zz') |
+-------------+
| NULL |
+-------------+
2006-07-24 19:01:54 +02:00
create table t1(a int, b varchar(255), c int);
Field Type Null Key Default Extra
a int(11) YES NULL
b varchar(255) YES NULL
c int(11) YES NULL
Field Type Null Key Default Extra
a int(11) YES NULL
b varchar(255) YES NULL
c int(11) YES NULL
drop table t1;
2006-08-16 17:03:41 +02:00
1
1
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
ERROR at line 1: USE must be followed by a database name
\
\\
';
';
2006-10-10 00:50:12 +02:00
create table t17583 (a int);
insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
insert into t17583 select a from t17583;
insert into t17583 select a from t17583;
insert into t17583 select a from t17583;
insert into t17583 select a from t17583;
insert into t17583 select a from t17583;
insert into t17583 select a from t17583;
insert into t17583 select a from t17583;
select count(*) from t17583;
count(*)
1280
drop table t17583;
2006-10-26 19:51:29 +02:00
Test connect without db- or host-name => reconnect
Test connect with dbname only => new dbname, old hostname
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
Test connect with _invalid_ dbname only => new invalid dbname, old hostname
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
Test connect with dbname + hostname
Test connect with dbname + _invalid_ hostname
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
The commands reported in the bug report
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
Too long dbname
2006-11-03 13:12:16 +01:00
ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
2006-10-26 19:51:29 +02:00
Too long hostname
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
2006-10-02 17:45:48 +02:00
1
1
ERROR at line 1: DELIMITER cannot contain a backslash character
ERROR at line 1: DELIMITER cannot contain a backslash character
2007-04-16 09:28:02 +02:00
1
1
2007-08-30 10:53:24 +02:00
1
1
2007-10-04 10:06:01 +02:00
This is a file starting with UTF8 BOM 0xEFBBBF
This is a file starting with UTF8 BOM 0xEFBBBF
2008-12-11 18:26:03 +01:00
delimiter
1
2
2
2
2
2009-01-09 12:50:18 +01:00
@z:='1' @z=database()
1 NULL
2006-05-10 04:35:51 +02:00
End of 5.0 tests