1
-- source include/not_embedded.inc
4
drop database if exists `mysqltest1`;
5
drop database if exists `mysqltest-1`;
6
drop database if exists `#mysql50#mysqltest-1`;
9
create database `mysqltest1`;
10
create database `#mysql50#mysqltest-1`;
11
create table `mysqltest1`.`t1` (a int);
12
create table `mysqltest1`.`#mysql50#t-1` (a int);
13
create table `#mysql50#mysqltest-1`.`t1` (a int);
14
create table `#mysql50#mysqltest-1`.`#mysql50#t-1` (a int);
15
show create database `mysqltest1`;
17
show create database `mysqltest-1`;
18
show create database `#mysql50#mysqltest-1`;
19
show tables in `mysqltest1`;
20
show tables in `#mysql50#mysqltest-1`;
22
--exec $MYSQL_CHECK --all-databases --fix-db-names --fix-table-names
24
show create database `mysqltest1`;
25
show create database `mysqltest-1`;
27
show create database `#mysql50#mysqltest-1`;
28
show tables in `mysqltest1`;
29
show tables in `mysqltest-1`;
30
drop database `mysqltest1`;
31
drop database `mysqltest-1`;
34
# Bug#17142: Crash if create with encoded name
37
drop table if exists `txu@0023p@0023p1`;
38
drop table if exists `txu#p#p1`;
40
create table `txu#p#p1` (s1 int);
41
insert into `txu#p#p1` values (1);
43
select * from `txu@0023p@0023p1`;
44
create table `txu@0023p@0023p1` (s1 int);
45
insert into `txu@0023p@0023p1` values (2);
46
select * from `txu@0023p@0023p1`;
47
select * from `txu#p#p1`;
48
drop table `txu@0023p@0023p1`;
49
drop table `txu#p#p1`;
52
# Check if old tables work
55
system cp $MYSQL_TEST_DIR/std_data/old_table-323.frm $MYSQLTEST_VARDIR/master-data/test/t1.frm;
60
# Bug#28360 (RENAME DATABASE destroys routines)
64
drop database if exists `tabc`;
65
drop database if exists `a-b-c`;
68
create database `tabc` default character set latin2;
69
create table tabc.t1 (a int);
72
# Manually make a 5.0 database from the template
73
--mkdir $MYSQLTEST_VARDIR/master-data/a-b-c
74
--copy_file $MYSQLTEST_VARDIR/master-data/tabc/db.opt $MYSQLTEST_VARDIR/master-data/a-b-c/db.opt
75
--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.frm $MYSQLTEST_VARDIR/master-data/a-b-c/t1.frm
76
--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYD $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYD
77
--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYI $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYI
79
show databases like '%a-b-c%';
80
ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;
81
# The physical directory name is now a@002db@002dc, the logical name still a-b-c
82
show databases like '%a-b-c%';
83
show create database `a-b-c`;
84
show tables in `a-b-c`;
85
show create table `a-b-c`.`t1`;
86
drop database `a-b-c`;