summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2004-09-06 07:43:31 +0200
committerunknown <joreland@mysql.com>2004-09-06 07:43:31 +0200
commitfd07116e2f705ab5e54b614eba9f32cf10b8b0f1 (patch)
tree4fdc68458808d0f58a5d559e3c181b8b6528f30a /mysql-test/r
parentf809e037e9392da78c8f71149e8294010c743806 (diff)
parent1230daf8f281bbb1ca07364b9a8c18ea4aa02a4d (diff)
downloadmariadb-git-fd07116e2f705ab5e54b614eba9f32cf10b8b0f1.tar.gz
merge
BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged mysql-test/t/ndb_blob.test: Auto merged ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/create.result38
-rw-r--r--mysql-test/r/fulltext2.result9
-rw-r--r--mysql-test/r/func_gconcat.result6
-rw-r--r--mysql-test/r/func_in.result10
-rw-r--r--mysql-test/r/lowercase_table.result29
-rw-r--r--mysql-test/r/merge.result9
-rw-r--r--mysql-test/r/ndb_basic.result8
-rw-r--r--mysql-test/r/ndb_blob.result5
-rw-r--r--mysql-test/r/ndb_transaction.result8
-rw-r--r--mysql-test/r/negation_elimination.result13
-rw-r--r--mysql-test/r/ps.result11
-rw-r--r--mysql-test/r/ps_1general.result8
-rw-r--r--mysql-test/r/rename.result1
-rw-r--r--mysql-test/r/rpl_charset.result160
-rw-r--r--mysql-test/r/rpl_delete_all.result10
-rw-r--r--mysql-test/r/show_check.result55
-rw-r--r--mysql-test/r/system_mysql_db.result152
-rw-r--r--mysql-test/r/union.result8
18 files changed, 311 insertions, 229 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 699485ff3f7..92c825f547d 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1,5 +1,5 @@
drop table if exists t1,t2,t3;
-drop database if exists test_$1;
+drop database if exists mysqltest;
create table t1 (b char(0));
insert into t1 values (""),(null);
select * from t1;
@@ -58,18 +58,18 @@ select 1ea10.1a20,1e+ 1e+10 from 1ea10;
drop table 1ea10;
create table t1 (t1.index int);
drop table t1;
-drop database if exists test_$1;
+drop database if exists mysqltest;
Warnings:
-Note 1008 Can't drop database 'test_$1'; database doesn't exist
-create database test_$1;
-create table test_$1.$test1 (a$1 int, $b int, c$ int);
-insert into test_$1.$test1 values (1,2,3);
-select a$1, $b, c$ from test_$1.$test1;
+Note 1008 Can't drop database 'mysqltest'; database doesn't exist
+create database mysqltest;
+create table mysqltest.$test1 (a$1 int, $b int, c$ int);
+insert into mysqltest.$test1 values (1,2,3);
+select a$1, $b, c$ from mysqltest.$test1;
a$1 $b c$
1 2 3
-create table test_$1.test2$ (a int);
-drop table test_$1.test2$;
-drop database test_$1;
+create table mysqltest.test2$ (a int);
+drop table mysqltest.test2$;
+drop database mysqltest;
create table `` (a int);
ERROR 42000: Incorrect table name ''
drop table if exists ``;
@@ -320,9 +320,9 @@ t3 CREATE TABLE `t3` (
select * from t3;
id name
drop table t2, t3;
-create database test_$1;
-create table test_$1.t3 like t1;
-create temporary table t3 like test_$1.t3;
+create database mysqltest;
+create table mysqltest.t3 like t1;
+create temporary table t3 like mysqltest.t3;
show create table t3;
Table Create Table
t3 CREATE TEMPORARY TABLE `t3` (
@@ -339,7 +339,7 @@ t2 CREATE TABLE `t2` (
select * from t2;
id name
create table t3 like t1;
-create table t3 like test_$1.t3;
+create table t3 like mysqltest.t3;
ERROR 42S01: Table 't3' already exists
create table non_existing_database.t1 like t1;
Got one of the listed errors
@@ -351,7 +351,7 @@ create table t3 like `a/a`;
ERROR 42000: Incorrect table name 'a/a'
drop table t1, t2, t3;
drop table t3;
-drop database test_$1;
+drop database mysqltest;
SET SESSION storage_engine="heap";
SELECT @@storage_engine;
@@storage_engine
@@ -488,12 +488,12 @@ Note 1291 Column 'cset' has duplicated value 'b' in SET
Note 1291 Column 'cset' has duplicated value 'B' in SET
Note 1291 Column 'cset' has duplicated value 'd' in SET
drop table t1, t2, t3;
-create database test_$1;
-use test_$1;
+create database mysqltest;
+use mysqltest;
select database();
database()
-test_$1
-drop database test_$1;
+mysqltest
+drop database mysqltest;
select database();
database()
NULL
diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result
index 0fdb7d4dbd1..0b1d8eb9a15 100644
--- a/mysql-test/r/fulltext2.result
+++ b/mysql-test/r/fulltext2.result
@@ -7,6 +7,15 @@ FULLTEXT KEY (a)
repair table t1 quick;
Table Op Msg_type Msg_text
test.t1 repair status OK
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
select count(*) from t1 where match a against ('aaaxxx');
count(*)
260
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index 5c98bc5b612..e0883a6297e 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -18,7 +18,7 @@ explain extended select grp,group_concat(c) from t1 group by grp;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort
Warnings:
-Note 1003 select test.t1.grp AS `grp`,group_concat(test.t1.c seperator ',') AS `group_concat(c)` from test.t1 group by test.t1.grp
+Note 1003 select test.t1.grp AS `grp`,group_concat(test.t1.c separator ',') AS `group_concat(c)` from test.t1 group by test.t1.grp
select grp,group_concat(a,c) from t1 group by grp;
grp group_concat(a,c)
1 1a
@@ -93,7 +93,7 @@ explain extended select grp,group_concat(distinct c order by c desc) from t1 gro
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort
Warnings:
-Note 1003 select test.t1.grp AS `grp`,group_concat(distinct test.t1.c order by test.t1.c seperator ',') AS `group_concat(distinct c order by c desc)` from test.t1 group by test.t1.grp
+Note 1003 select test.t1.grp AS `grp`,group_concat(distinct test.t1.c order by test.t1.c separator ',') AS `group_concat(distinct c order by c desc)` from test.t1 group by test.t1.grp
select grp,group_concat(c order by c separator ",") from t1 group by grp;
grp group_concat(c order by c separator ",")
1 a
@@ -113,7 +113,7 @@ explain extended select grp,group_concat(distinct c order by c separator ",") fr
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort
Warnings:
-Note 1003 select test.t1.grp AS `grp`,group_concat(distinct test.t1.c order by test.t1.c seperator ',') AS `group_concat(distinct c order by c separator ",")` from test.t1 group by test.t1.grp
+Note 1003 select test.t1.grp AS `grp`,group_concat(distinct test.t1.c order by test.t1.c separator ',') AS `group_concat(distinct c order by c separator ",")` from test.t1 group by test.t1.grp
select grp,group_concat(distinct c order by c desc separator ",") from t1 group by grp;
grp group_concat(distinct c order by c desc separator ",")
1 a
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index f66b3dea94b..374affce8c5 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -148,6 +148,16 @@ id select_type table type possible_keys key key_len ref rows Extra
Warnings:
Note 1003 select test.t1.a AS `a`,test.t1.b AS `b`,test.t1.c AS `c` from test.t1 where (_latin1'a' in (test.t1.a,test.t1.b,(test.t1.c collate _latin1'latin1_bin')))
drop table t1;
+set names utf8;
+create table t1 (a char(10) character set utf8 not null);
+insert into t1 values ('bbbb'),(_koi8r'ÃÃÃÃ'),(_latin1'ÄÄÄÄ');
+select a from t1 where a in ('bbbb',_koi8r'ÃÃÃÃ',_latin1'ÄÄÄÄ') order by a;
+a
+ÄÄÄÄ
+bbbb
+цццц
+drop table t1;
+set names latin1;
select '1.0' in (1,2);
'1.0' in (1,2)
1
diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result
index 2f71e4c2f57..a30ec0f160c 100644
--- a/mysql-test/r/lowercase_table.result
+++ b/mysql-test/r/lowercase_table.result
@@ -1,4 +1,6 @@
drop table if exists t1,t2,t3,t4;
+drop table if exists t0,t5,t6,t7,t8,t9;
+drop database if exists mysqltest;
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
create table t4 (id int primary key, Word varchar(40) not null);
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
@@ -42,6 +44,26 @@ select count(bags.a) from t1 as Bags;
count(bags.a)
0
drop table t1;
+create database mysqltest;
+use MYSQLTEST;
+create table t1 (a int);
+select T1.a from MYSQLTEST.T1;
+a
+select t1.a from MYSQLTEST.T1;
+a
+select mysqltest.t1.* from MYSQLTEST.t1;
+a
+select MYSQLTEST.t1.* from MYSQLTEST.t1;
+a
+select MYSQLTEST.T1.* from MYSQLTEST.T1;
+a
+select MYSQLTEST.T1.* from T1;
+a
+alter table t1 rename to T1;
+select MYSQLTEST.t1.* from MYSQLTEST.t1;
+a
+drop database mysqltest;
+use test;
create table t1 (a int);
create table t2 (a int);
delete p1.*,P2.* from t1 as p1, t2 as p2 where p1.a=P2.a;
@@ -58,10 +80,3 @@ ERROR 42000: Not unique table/alias: 'C'
drop table t1, t2;
show tables;
Tables_in_test
-create table t1 (a int);
-select TEST.t1.* from TEST.t1;
-a
-alter table t1 rename to T1;
-select TEST.t1.* from TEST.t1;
-a
-drop table t1;
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 83f8230f11c..5755033190b 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -642,3 +642,12 @@ x y
1 3
1 2
drop table t1,t2,t3;
+create table t1 (a int);
+create table t2 (a int);
+insert into t1 values (0);
+insert into t2 values (1);
+create table t3 engine=merge union=(t1, t2) select * from t1;
+ERROR HY000: You can't specify target table 't1' for update in FROM clause
+create table t3 engine=merge union=(t1, t2) select * from t2;
+ERROR HY000: You can't specify target table 't2' for update in FROM clause
+drop table t1, t2;
diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result
index f5815cc11d9..80e1aa7939a 100644
--- a/mysql-test/r/ndb_basic.result
+++ b/mysql-test/r/ndb_basic.result
@@ -1,5 +1,5 @@
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
-drop database if exists test2;
+drop database if exists mysqltest;
CREATE TABLE t1 (
pk1 INT NOT NULL PRIMARY KEY,
attr1 INT NOT NULL,
@@ -369,8 +369,8 @@ attr2 INT,
attr3 VARCHAR(10)
) ENGINE=ndbcluster;
INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
-create database test2;
-use test2;
+create database mysqltest;
+use mysqltest;
CREATE TABLE t2 (
a bigint unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
@@ -388,4 +388,4 @@ select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a;
b attr1
9413 9412
drop table test.t1, t2;
-drop database test2;
+drop database mysqltest;
diff --git a/mysql-test/r/ndb_blob.result b/mysql-test/r/ndb_blob.result
index a9731f97d6b..4244c05e446 100644
--- a/mysql-test/r/ndb_blob.result
+++ b/mysql-test/r/ndb_blob.result
@@ -93,6 +93,9 @@ a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3)
2 4512 b1 6000 dd1
update t1 set d=null where a=1;
commit;
+select a from t1 where d is null;
+a
+1
delete from t1 where a=1;
delete from t1 where a=2;
commit;
@@ -372,3 +375,5 @@ rollback;
select count(*) from t1;
count(*)
0
+drop table t1;
+drop database mysqltest;
diff --git a/mysql-test/r/ndb_transaction.result b/mysql-test/r/ndb_transaction.result
index 18cbf3e731b..691b91b1d36 100644
--- a/mysql-test/r/ndb_transaction.result
+++ b/mysql-test/r/ndb_transaction.result
@@ -1,5 +1,5 @@
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
-drop database if exists test2;
+drop database if exists mysqltest;
CREATE TABLE t1 (
pk1 INT NOT NULL PRIMARY KEY,
attr1 INT NOT NULL
@@ -211,8 +211,8 @@ CREATE TABLE t1 (
pk1 INT NOT NULL PRIMARY KEY,
attr1 INT NOT NULL
) ENGINE=ndbcluster;
-create database test2;
-use test2;
+create database mysqltest;
+use mysqltest;
CREATE TABLE t2 (
a bigint unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
@@ -254,4 +254,4 @@ select count(*) from t2;
count(*)
0
drop table test.t1, t2;
-drop database test2;
+drop database mysqltest;
diff --git a/mysql-test/r/negation_elimination.result b/mysql-test/r/negation_elimination.result
index a3a2bad7ec6..9193a125cd1 100644
--- a/mysql-test/r/negation_elimination.result
+++ b/mysql-test/r/negation_elimination.result
@@ -375,4 +375,17 @@ a
13
14
15
+delete from t1 where a > 3;
+select a, not(not(a)) from t1;
+a not(not(a))
+NULL NULL
+0 0
+1 1
+2 1
+3 1
+explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL a 5 NULL 5 Using where; Using index
+Warnings:
+Note 1003 select test.t1.a AS `a`,(test.t1.a <> 0) AS `not(not(a))`,((test.t1.a > 2) or test.t1.a) AS `not(a <= 2 and not(a))`,(test.t1.a like _latin1'1') AS `not(a not like "1")`,(test.t1.a in (1,2)) AS `not (a not in (1,2))`,(test.t1.a = 2) AS `not(a != 2)` from test.t1 where test.t1.a having test.t1.a
drop table t1;
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index e161904cd6f..321b8894796 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -259,3 +259,14 @@ execute `ü`;
1234
1234
set names default;
+create table t1 (a varchar(10)) charset=utf8;
+insert into t1 (a) values ('yahoo');
+set character_set_connection=latin1;
+prepare stmt from 'select a from t1 where a like ?';
+set @var='google';
+execute stmt using @var;
+a
+execute stmt using @var;
+a
+deallocate prepare stmt;
+drop table t1;
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index 9ef1202a9a1..e9a5f705fa7 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -334,12 +334,12 @@ prepare stmt1 from ' deallocate prepare never_prepared ' ;
ERROR 42000: 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 'never_prepared' at line 1
prepare stmt4 from ' use test ' ;
ERROR HY000: This command is not supported in the prepared statement protocol yet
-prepare stmt3 from ' create database drop_me ';
+prepare stmt3 from ' create database mysqltest ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
-create database drop_me ;
-prepare stmt3 from ' drop database drop_me ';
+create database mysqltest ;
+prepare stmt3 from ' drop database mysqltest ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
-drop database drop_me ;
+drop database mysqltest ;
prepare stmt3 from ' grant all on test.t1 to drop_user@localhost
identified by ''looser'' ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
diff --git a/mysql-test/r/rename.result b/mysql-test/r/rename.result
index 9bcf1bc7f97..ec36f015412 100644
--- a/mysql-test/r/rename.result
+++ b/mysql-test/r/rename.result
@@ -1,4 +1,5 @@
drop table if exists t0,t1,t2,t3,t4;
+drop table if exists t0,t5,t6,t7,t8,t9;
create table t0 SELECT 1,"table 1";
create table t2 SELECT 2,"table 2";
create table t3 SELECT 3,"table 3";
diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result
index d5f8ac4f293..a60c9269625 100644
--- a/mysql-test/r/rpl_charset.result
+++ b/mysql-test/r/rpl_charset.result
@@ -4,41 +4,41 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-drop database if exists test2;
-drop database if exists test3;
-create database test2 character set latin2;
+drop database if exists mysqltest2;
+drop database if exists mysqltest3;
+create database mysqltest2 character set latin2;
set @@character_set_server=latin5;
-create database test3;
+create database mysqltest3;
--- --master--
-show create database test2;
+show create database mysqltest2;
Database Create Database
-test2 CREATE DATABASE `test2` /*!40100 DEFAULT CHARACTER SET latin2 */
-show create database test3;
+mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
+show create database mysqltest3;
Database Create Database
-test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET latin5 */
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
--- --slave--
-show create database test2;
+show create database mysqltest2;
Database Create Database
-test2 CREATE DATABASE `test2` /*!40100 DEFAULT CHARACTER SET latin2 */
-show create database test3;
+mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */
+show create database mysqltest3;
Database Create Database
-test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET latin5 */
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */
set @@collation_server=armscii8_bin;
-drop database test3;
-create database test3;
+drop database mysqltest3;
+create database mysqltest3;
--- --master--
-show create database test3;
+show create database mysqltest3;
Database Create Database
-test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
--- --slave--
-show create database test3;
+show create database mysqltest3;
Database Create Database
-test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
-use test2;
+mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
+use mysqltest2;
create table t1 (a int auto_increment primary key, b varchar(100));
set character_set_client=cp850, collation_connection=latin2_croatian_ci;
insert into t1 (b) values(@@character_set_server);
@@ -57,7 +57,7 @@ a b
5 latin2_croatian_ci
--- --slave--
-select * from test2.t1 order by a;
+select * from mysqltest2.t1 order by a;
a b
1 armscii8
2 armscii8_bin
@@ -81,7 +81,7 @@ a b
4 Müller
--- --slave--
-select * from test2.t1 order by a;
+select * from mysqltest2.t1 order by a;
a b
1 latin1_german1_ci
2 Muffler
@@ -98,69 +98,69 @@ a b
1 cp850_general_ci
--- --slave--
-select * from test2.t1 order by a;
+select * from mysqltest2.t1 order by a;
a b
1 cp850_general_ci
-drop database test2;
-drop database test3;
+drop database mysqltest2;
+drop database mysqltest3;
show binlog events from 79;
Log_name Pos Event_type Server_id Orig_log_pos Info
-master-bin.000001 79 Query 1 79 use `test`; drop database if exists test2
-master-bin.000001 143 Query 1 143 use `test`; drop database if exists test3
-master-bin.000001 207 Query 1 207 use `test`; create database test2 character set latin2
-master-bin.000001 284 Query 1 284 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
-master-bin.000001 418 Query 1 418 use `test`; create database test3
-master-bin.000001 474 Query 1 474 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
-master-bin.000001 608 Query 1 608 use `test`; drop database test3
-master-bin.000001 662 Query 1 662 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
-master-bin.000001 796 Query 1 796 use `test`; create database test3
-master-bin.000001 852 Query 1 852 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 987 Query 1 987 use `test2`; create table t1 (a int auto_increment primary key, b varchar(100))
-master-bin.000001 1089 Query 1 1089 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 1225 Intvar 1 1225 INSERT_ID=1
-master-bin.000001 1253 Query 1 1253 use `test2`; insert into t1 (b) values(@@character_set_server)
-master-bin.000001 1338 Query 1 1338 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 1474 Intvar 1 1474 INSERT_ID=2
-master-bin.000001 1502 Query 1 1502 use `test2`; insert into t1 (b) values(@@collation_server)
-master-bin.000001 1583 Query 1 1583 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 1719 Intvar 1 1719 INSERT_ID=3
-master-bin.000001 1747 Query 1 1747 use `test2`; insert into t1 (b) values(@@character_set_client)
-master-bin.000001 1832 Query 1 1832 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 1968 Intvar 1 1968 INSERT_ID=4
-master-bin.000001 1996 Query 1 1996 use `test2`; insert into t1 (b) values(@@character_set_connection)
-master-bin.000001 2085 Query 1 2085 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 2221 Intvar 1 2221 INSERT_ID=5
-master-bin.000001 2249 Query 1 2249 use `test2`; insert into t1 (b) values(@@collation_connection)
-master-bin.000001 2334 Query 1 2334 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 2469 Query 1 2469 use `test2`; truncate table t1
-master-bin.000001 2522 Query 1 2522 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 2657 Intvar 1 2657 INSERT_ID=1
-master-bin.000001 2685 Query 1 2685 use `test2`; insert into t1 (b) values(@@collation_connection)
-master-bin.000001 2770 Query 1 2770 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 2905 Intvar 1 2905 INSERT_ID=2
-master-bin.000001 2933 Query 1 2933 use `test2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
-master-bin.000001 3021 Query 1 3021 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 3157 Intvar 1 3157 INSERT_ID=3
-master-bin.000001 3185 Query 1 3185 use `test2`; insert into t1 (b) values(@@collation_connection)
-master-bin.000001 3270 Query 1 3270 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 3406 Intvar 1 3406 INSERT_ID=4
-master-bin.000001 3434 Query 1 3434 use `test2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
-master-bin.000001 3522 Query 1 3522 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 3658 Intvar 1 3658 INSERT_ID=74
-master-bin.000001 3686 Create_file 1 3686 db=test2;table=t1;file_id=1;block_len=581
-master-bin.000001 4354 Query 1 4354 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 4490 Intvar 1 4490 INSERT_ID=5
-master-bin.000001 4518 Exec_load 1 4518 ;file_id=1
-master-bin.000001 4541 Query 1 4541 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 4677 Query 1 4677 use `test2`; truncate table t1
-master-bin.000001 4730 Query 1 4730 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 4866 Intvar 1 4866 INSERT_ID=1
-master-bin.000001 4894 User var 1 4894 @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
-master-bin.000001 4934 Query 1 4934 use `test2`; insert into t1 (b) values(collation(@a))
-master-bin.000001 5010 Query 1 5010 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 5146 Query 1 5146 use `test2`; drop database test2
-master-bin.000001 5201 Query 1 5201 SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001 5332 Query 1 5332 drop database test3
+master-bin.000001 79 Query 1 79 use `test`; drop database if exists mysqltest2
+master-bin.000001 148 Query 1 148 use `test`; drop database if exists mysqltest3
+master-bin.000001 217 Query 1 217 use `test`; create database mysqltest2 character set latin2
+master-bin.000001 299 Query 1 299 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
+master-bin.000001 433 Query 1 433 use `test`; create database mysqltest3
+master-bin.000001 494 Query 1 494 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
+master-bin.000001 628 Query 1 628 use `test`; drop database mysqltest3
+master-bin.000001 687 Query 1 687 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
+master-bin.000001 821 Query 1 821 use `test`; create database mysqltest3
+master-bin.000001 882 Query 1 882 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 1022 Query 1 1022 use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
+master-bin.000001 1129 Query 1 1129 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 1270 Intvar 1 1270 INSERT_ID=1
+master-bin.000001 1298 Query 1 1298 use `mysqltest2`; insert into t1 (b) values(@@character_set_server)
+master-bin.000001 1388 Query 1 1388 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 1529 Intvar 1 1529 INSERT_ID=2
+master-bin.000001 1557 Query 1 1557 use `mysqltest2`; insert into t1 (b) values(@@collation_server)
+master-bin.000001 1643 Query 1 1643 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 1784 Intvar 1 1784 INSERT_ID=3
+master-bin.000001 1812 Query 1 1812 use `mysqltest2`; insert into t1 (b) values(@@character_set_client)
+master-bin.000001 1902 Query 1 1902 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 2043 Intvar 1 2043 INSERT_ID=4
+master-bin.000001 2071 Query 1 2071 use `mysqltest2`; insert into t1 (b) values(@@character_set_connection)
+master-bin.000001 2165 Query 1 2165 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 2306 Intvar 1 2306 INSERT_ID=5
+master-bin.000001 2334 Query 1 2334 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
+master-bin.000001 2424 Query 1 2424 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 2564 Query 1 2564 use `mysqltest2`; truncate table t1
+master-bin.000001 2622 Query 1 2622 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 2762 Intvar 1 2762 INSERT_ID=1
+master-bin.000001 2790 Query 1 2790 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
+master-bin.000001 2880 Query 1 2880 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 3020 Intvar 1 3020 INSERT_ID=2
+master-bin.000001 3048 Query 1 3048 use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
+master-bin.000001 3141 Query 1 3141 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 3282 Intvar 1 3282 INSERT_ID=3
+master-bin.000001 3310 Query 1 3310 use `mysqltest2`; insert into t1 (b) values(@@collation_connection)
+master-bin.000001 3400 Query 1 3400 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 3541 Intvar 1 3541 INSERT_ID=4
+master-bin.000001 3569 Query 1 3569 use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
+master-bin.000001 3662 Query 1 3662 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 3803 Intvar 1 3803 INSERT_ID=74
+master-bin.000001 3831 Create_file 1 3831 db=mysqltest2;table=t1;file_id=1;block_len=581
+master-bin.000001 4504 Query 1 4504 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 4645 Intvar 1 4645 INSERT_ID=5
+master-bin.000001 4673 Exec_load 1 4673 ;file_id=1
+master-bin.000001 4696 Query 1 4696 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 4837 Query 1 4837 use `mysqltest2`; truncate table t1
+master-bin.000001 4895 Query 1 4895 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 5036 Intvar 1 5036 INSERT_ID=1
+master-bin.000001 5064 User var 1 5064 @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
+master-bin.000001 5104 Query 1 5104 use `mysqltest2`; insert into t1 (b) values(collation(@a))
+master-bin.000001 5185 Query 1 5185 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 5326 Query 1 5326 use `mysqltest2`; drop database mysqltest2
+master-bin.000001 5391 Query 1 5391 SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
+master-bin.000001 5522 Query 1 5522 drop database mysqltest3
set global character_set_server=latin2;
ERROR HY000: Binary logging and replication forbid changing the global server character set or collation
set global character_set_server=latin2;
diff --git a/mysql-test/r/rpl_delete_all.result b/mysql-test/r/rpl_delete_all.result
index 97a535490dd..5ed221823e8 100644
--- a/mysql-test/r/rpl_delete_all.result
+++ b/mysql-test/r/rpl_delete_all.result
@@ -4,12 +4,12 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-create database test1;
-drop database if exists test1;
+create database mysqltest;
+drop database if exists mysqltest;
Warnings:
-Note 1008 Can't drop database 'test1'; database doesn't exist
-show tables from test1;
-ERROR HY000: Can't read dir of './test1/' (Errcode: X)
+Note 1008 Can't drop database 'mysqltest'; database doesn't exist
+show tables from mysqltest;
+ERROR HY000: Can't read dir of './mysqltest/' (Errcode: X)
create table t1 (a int);
drop table if exists t1;
Warnings:
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index b78748b7726..8b52e6efedc 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -1,4 +1,5 @@
drop table if exists t1,t2;
+drop database if exists mysqltest;
create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
check table t1 fast;
@@ -362,39 +363,39 @@ t1 HEAP 9 Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP 9 Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP 9 Fixed 0 9 # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL
drop table t1, t2, t3;
-create database test_$1;
-show create database test_$1;
+create database mysqltest;
+show create database mysqltest;
Database Create Database
-test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */
-create table test_$1.t1(a int);
-insert into test_$1.t1 values(1);
-grant select on `test_$1`.* to mysqltest_1@localhost;
-grant usage on `test_$1`.* to mysqltest_2@localhost;
-grant drop on `test_$1`.* to mysqltest_3@localhost;
+mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */
+create table mysqltest.t1(a int);
+insert into mysqltest.t1 values(1);
+grant select on `mysqltest`.* to mysqltest_1@localhost;
+grant usage on `mysqltest`.* to mysqltest_2@localhost;
+grant drop on `mysqltest`.* to mysqltest_3@localhost;
select * from t1;
a
1
-show create database test_$1;
+show create database mysqltest;
Database Create Database
-test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */
+mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */
drop table t1;
-ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1'
-drop database test_$1;
-ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1'
-select * from test_$1.t1;
-ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
-show create database test_$1;
-ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
-drop table test_$1.t1;
-ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
-drop database test_$1;
-ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
-select * from test_$1.t1;
-ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1'
-show create database test_$1;
-ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1'
-drop table test_$1.t1;
-drop database test_$1;
+ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest'
+drop database mysqltest;
+ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest'
+select * from mysqltest.t1;
+ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest'
+show create database mysqltest;
+ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest'
+drop table mysqltest.t1;
+ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest'
+drop database mysqltest;
+ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest'
+select * from mysqltest.t1;
+ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest'
+show create database mysqltest;
+ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest'
+drop table mysqltest.t1;
+drop database mysqltest;
set names binary;
delete from mysql.user
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index 3fbe842ce49..ebb24159373 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -18,71 +18,71 @@ user
show create table db;
Table Create Table
db CREATE TABLE `db` (
- `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '',
- `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '',
- `User` char(16) character set latin1 collate latin1_bin NOT NULL default '',
- `Select_priv` enum('N','Y') NOT NULL default 'N',
- `Insert_priv` enum('N','Y') NOT NULL default 'N',
- `Update_priv` enum('N','Y') NOT NULL default 'N',
- `Delete_priv` enum('N','Y') NOT NULL default 'N',
- `Create_priv` enum('N','Y') NOT NULL default 'N',
- `Drop_priv` enum('N','Y') NOT NULL default 'N',
- `Grant_priv` enum('N','Y') NOT NULL default 'N',
- `References_priv` enum('N','Y') NOT NULL default 'N',
- `Index_priv` enum('N','Y') NOT NULL default 'N',
- `Alter_priv` enum('N','Y') NOT NULL default 'N',
- `Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N',
- `Lock_tables_priv` enum('N','Y') NOT NULL default 'N',
+ `Host` char(60) collate utf8_bin NOT NULL default '',
+ `Db` char(64) collate utf8_bin NOT NULL default '',
+ `User` char(16) collate utf8_bin NOT NULL default '',
+ `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Database privileges'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
show create table host;
Table Create Table
host CREATE TABLE `host` (
- `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '',
- `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '',
- `Select_priv` enum('N','Y') NOT NULL default 'N',
- `Insert_priv` enum('N','Y') NOT NULL default 'N',
- `Update_priv` enum('N','Y') NOT NULL default 'N',
- `Delete_priv` enum('N','Y') NOT NULL default 'N',
- `Create_priv` enum('N','Y') NOT NULL default 'N',
- `Drop_priv` enum('N','Y') NOT NULL default 'N',
- `Grant_priv` enum('N','Y') NOT NULL default 'N',
- `References_priv` enum('N','Y') NOT NULL default 'N',
- `Index_priv` enum('N','Y') NOT NULL default 'N',
- `Alter_priv` enum('N','Y') NOT NULL default 'N',
- `Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N',
- `Lock_tables_priv` enum('N','Y') NOT NULL default 'N',
+ `Host` char(60) collate utf8_bin NOT NULL default '',
+ `Db` char(64) collate utf8_bin NOT NULL default '',
+ `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Host privileges; Merged with database privileges'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
show create table user;
Table Create Table
user CREATE TABLE `user` (
- `Host` varchar(60) character set latin1 collate latin1_bin NOT NULL default '',
- `User` varchar(16) character set latin1 collate latin1_bin NOT NULL default '',
- `Password` varchar(41) character set latin1 collate latin1_bin NOT NULL default '',
- `Select_priv` enum('N','Y') NOT NULL default 'N',
- `Insert_priv` enum('N','Y') NOT NULL default 'N',
- `Update_priv` enum('N','Y') NOT NULL default 'N',
- `Delete_priv` enum('N','Y') NOT NULL default 'N',
- `Create_priv` enum('N','Y') NOT NULL default 'N',
- `Drop_priv` enum('N','Y') NOT NULL default 'N',
- `Reload_priv` enum('N','Y') NOT NULL default 'N',
- `Shutdown_priv` enum('N','Y') NOT NULL default 'N',
- `Process_priv` enum('N','Y') NOT NULL default 'N',
- `File_priv` enum('N','Y') NOT NULL default 'N',
- `Grant_priv` enum('N','Y') NOT NULL default 'N',
- `References_priv` enum('N','Y') NOT NULL default 'N',
- `Index_priv` enum('N','Y') NOT NULL default 'N',
- `Alter_priv` enum('N','Y') NOT NULL default 'N',
- `Show_db_priv` enum('N','Y') NOT NULL default 'N',
- `Super_priv` enum('N','Y') NOT NULL default 'N',
- `Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N',
- `Lock_tables_priv` enum('N','Y') NOT NULL default 'N',
- `Execute_priv` enum('N','Y') NOT NULL default 'N',
- `Repl_slave_priv` enum('N','Y') NOT NULL default 'N',
- `Repl_client_priv` enum('N','Y') NOT NULL default 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') NOT NULL default '',
+ `Host` varchar(60) collate utf8_bin NOT NULL default '',
+ `User` varchar(16) collate utf8_bin NOT NULL default '',
+ `Password` varchar(41) collate utf8_bin NOT NULL default '',
+ `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Reload_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Shutdown_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Process_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `File_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Show_db_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Super_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Execute_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Repl_slave_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `Repl_client_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
+ `ssl_type` enum('','ANY','X509','SPECIFIED') collate utf8_bin NOT NULL default '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
@@ -90,41 +90,41 @@ user CREATE TABLE `user` (
`max_updates` int(11) unsigned NOT NULL default '0',
`max_connections` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Users and global privileges'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
Table Create Table
func CREATE TABLE `func` (
- `name` char(64) character set latin1 collate latin1_bin NOT NULL default '',
+ `name` char(64) collate utf8_bin NOT NULL default '',
`ret` tinyint(1) NOT NULL default '0',
- `dl` char(128) NOT NULL default '',
- `type` enum('function','aggregate') NOT NULL default 'function',
+ `dl` char(128) collate utf8_bin NOT NULL default '',
+ `type` enum('function','aggregate') collate utf8_bin NOT NULL default 'function',
PRIMARY KEY (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='User defined functions'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
- `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '',
- `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '',
- `User` char(16) character set latin1 collate latin1_bin NOT NULL default '',
- `Table_name` char(64) character set latin1 collate latin1_bin NOT NULL default '',
- `Grantor` char(77) NOT NULL default '',
+ `Host` char(60) collate utf8_bin NOT NULL default '',
+ `Db` char(64) collate utf8_bin NOT NULL default '',
+ `User` char(16) collate utf8_bin NOT NULL default '',
+ `Table_name` char(64) collate utf8_bin NOT NULL default '',
+ `Grantor` char(77) collate utf8_bin NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') NOT NULL default '',
- `Column_priv` set('Select','Insert','Update','References') NOT NULL default '',
+ `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') collate utf8_bin NOT NULL default '',
+ `Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Table privileges'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
show create table columns_priv;
Table Create Table
columns_priv CREATE TABLE `columns_priv` (
- `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '',
- `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '',
- `User` char(16) character set latin1 collate latin1_bin NOT NULL default '',
- `Table_name` char(64) character set latin1 collate latin1_bin NOT NULL default '',
- `Column_name` char(64) character set latin1 collate latin1_bin NOT NULL default '',
+ `Host` char(60) collate utf8_bin NOT NULL default '',
+ `Db` char(64) collate utf8_bin NOT NULL default '',
+ `User` char(16) collate utf8_bin NOT NULL default '',
+ `Table_name` char(64) collate utf8_bin NOT NULL default '',
+ `Column_name` char(64) collate utf8_bin NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `Column_priv` set('Select','Insert','Update','References') NOT NULL default '',
+ `Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Column privileges'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
show tables;
Tables_in_test
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index afee837b1a5..2f42bedf67a 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -436,6 +436,14 @@ select length(version()) > 1 as `*` UNION select 2;
*
1
2
+create table t1 (a int);
+insert into t1 values (0), (3), (1), (2);
+explain (select * from t1) union (select * from t1) order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 4
+2 UNION t1 ALL NULL NULL NULL NULL 4
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL Using filesort
+drop table t1;
CREATE TABLE t1 ( id int(3) unsigned default '0') ENGINE=MyISAM;
INSERT INTO t1 (id) VALUES("1");
CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) ENGINE=MyISAM;