~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

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

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1,t2,t7,t8,t9;
 
2
drop database if exists mysqltest;
 
3
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a));
 
4
create table t2 (a int not null auto_increment, b char(16) not null, primary key (a));
 
5
insert into t1 (b) values ("test"),("test1"),("test2"),("test3");
 
6
insert into t2 (b) select b from t1;
 
7
insert into t1 (b) select b from t2;
 
8
insert into t2 (b) select b from t1;
 
9
insert into t1 (b) select b from t2;
 
10
insert into t2 (b) select b from t1;
 
11
insert into t1 (b) select b from t2;
 
12
insert into t2 (b) select b from t1;
 
13
insert into t1 (b) select b from t2;
 
14
insert into t2 (b) select b from t1;
 
15
insert into t1 (b) select b from t2;
 
16
insert into t2 (b) select b from t1;
 
17
insert into t1 (b) select b from t2;
 
18
insert into t2 (b) select b from t1;
 
19
insert into t1 (b) select b from t2;
 
20
insert into t2 (b) select b from t1;
 
21
insert into t1 (b) select b from t2;
 
22
insert into t2 (b) select b from t1;
 
23
insert into t1 (b) select b from t2;
 
24
drop table t2;
 
25
create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp" index directory="MYSQLTEST_VARDIR/run";
 
26
insert into t9 select * from t1;
 
27
check table t9;
 
28
Table   Op      Msg_type        Msg_text
 
29
test.t9 check   status  OK
 
30
optimize table t9;
 
31
Table   Op      Msg_type        Msg_text
 
32
test.t9 optimize        status  OK
 
33
repair table t9;
 
34
Table   Op      Msg_type        Msg_text
 
35
test.t9 repair  status  OK
 
36
alter table t9 add column c int not null;
 
37
show create table t9;
 
38
Table   Create Table
 
39
t9      CREATE TABLE `t9` (
 
40
  `a` int(11) NOT NULL AUTO_INCREMENT,
 
41
  `b` char(16) NOT NULL,
 
42
  `c` int(11) NOT NULL,
 
43
  PRIMARY KEY (`a`)
 
44
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
 
45
alter table t9 rename t8, add column d int not null;
 
46
alter table t8 rename t7;
 
47
rename table t7 to t9;
 
48
drop table t1;
 
49
SHOW CREATE TABLE t9;
 
50
Table   Create Table
 
51
t9      CREATE TABLE `t9` (
 
52
  `a` int(11) NOT NULL AUTO_INCREMENT,
 
53
  `b` char(16) NOT NULL,
 
54
  `c` int(11) NOT NULL,
 
55
  `d` int(11) NOT NULL,
 
56
  PRIMARY KEY (`a`)
 
57
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
 
58
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
 
59
Got one of the listed errors
 
60
create database mysqltest;
 
61
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
 
62
Got one of the listed errors
 
63
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
 
64
Got one of the listed errors
 
65
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="MYSQLTEST_VARDIR/run";
 
66
Got one of the listed errors
 
67
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp";
 
68
Got one of the listed errors
 
69
alter table t9 rename mysqltest.t9;
 
70
select count(*) from mysqltest.t9;
 
71
count(*)
 
72
16724
 
73
show create table mysqltest.t9;
 
74
Table   Create Table
 
75
t9      CREATE TABLE `t9` (
 
76
  `a` int(11) NOT NULL AUTO_INCREMENT,
 
77
  `b` char(16) NOT NULL,
 
78
  `c` int(11) NOT NULL,
 
79
  `d` int(11) NOT NULL,
 
80
  PRIMARY KEY (`a`)
 
81
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
 
82
drop database mysqltest;
 
83
create table t1 (a int not null) engine=myisam;
 
84
alter table t1 data directory="MYSQLTEST_VARDIR/tmp";
 
85
Warnings:
 
86
Warning 0       DATA DIRECTORY option ignored
 
87
show create table t1;
 
88
Table   Create Table
 
89
t1      CREATE TABLE `t1` (
 
90
  `a` int(11) NOT NULL
 
91
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
92
alter table t1 add b int;
 
93
alter table t1 data directory="MYSQLTEST_VARDIR/log";
 
94
Warnings:
 
95
Warning 0       DATA DIRECTORY option ignored
 
96
show create table t1;
 
97
Table   Create Table
 
98
t1      CREATE TABLE `t1` (
 
99
  `a` int(11) NOT NULL,
 
100
  `b` int(11) DEFAULT NULL
 
101
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
102
alter table t1 index directory="MYSQLTEST_VARDIR/log";
 
103
Warnings:
 
104
Warning 0       INDEX DIRECTORY option ignored
 
105
show create table t1;
 
106
Table   Create Table
 
107
t1      CREATE TABLE `t1` (
 
108
  `a` int(11) NOT NULL,
 
109
  `b` int(11) DEFAULT NULL
 
110
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
111
drop table t1;
 
112
CREATE TABLE t1(a INT)
 
113
DATA DIRECTORY='TEST_DIR/tmp'
 
114
INDEX DIRECTORY='TEST_DIR/tmp';
 
115
Got one of the listed errors
 
116
CREATE TABLE t2(a INT)
 
117
DATA DIRECTORY='TEST_DIR/tmp'
 
118
INDEX DIRECTORY='TEST_DIR/tmp';
 
119
RENAME TABLE t2 TO t1;
 
120
ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17)
 
121
DROP TABLE t2;
 
122
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a;
 
123
show create table t1;
 
124
Table   Create Table
 
125
t1      CREATE TEMPORARY TABLE `t1` (
 
126
  `a` int(11) DEFAULT NULL
 
127
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
 
128
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 99 a;
 
129
show create table t1;
 
130
Table   Create Table
 
131
t1      CREATE TEMPORARY TABLE `t1` (
 
132
  `a` int(11) DEFAULT NULL
 
133
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
 
134
create table t1 (a int) engine=myisam select 42 a;
 
135
select * from t1;
 
136
a
 
137
9
 
138
select * from t1;
 
139
a
 
140
99
 
141
select * from t1;
 
142
a
 
143
42
 
144
drop table t1;
 
145
End of 4.1 tests
 
146
SET SESSION keep_files_on_create = TRUE;
 
147
CREATE TABLE t1 (a INT) ENGINE MYISAM;
 
148
Got one of the listed errors
 
149
SET SESSION keep_files_on_create = FALSE;
 
150
CREATE TABLE t1 (a INT) ENGINE MYISAM;
 
151
DROP TABLE t1;
 
152
End of 5.0 tests
 
153
CREATE TABLE t1(a INT)
 
154
INDEX DIRECTORY='TEST_DIR/master-data/mysql';
 
155
ERROR HY000: Incorrect arguments to INDEX DIRECTORY
 
156
CREATE TABLE t1(a INT)
 
157
DATA DIRECTORY='TEST_DIR/master-data/test';
 
158
ERROR HY000: Incorrect arguments to DATA DIRECTORY
 
159
CREATE TABLE t1(a INT)
 
160
DATA DIRECTORY='TEST_DIR/master-data/';
 
161
ERROR HY000: Incorrect arguments to DATA DIRECTORY
 
162
CREATE TABLE t1(a INT)
 
163
INDEX DIRECTORY='TEST_DIR/master-data';
 
164
ERROR HY000: Incorrect arguments to INDEX DIRECTORY
 
165
CREATE TABLE t1(a INT)
 
166
INDEX DIRECTORY='TEST_DIR/master-data_var';
 
167
ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2)
 
168
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE';
 
169
CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp';
 
170
Warnings:
 
171
Warning 0       DATA DIRECTORY option ignored
 
172
Warning 0       INDEX DIRECTORY option ignored
 
173
DROP TABLE t1;
 
174
SET @@SQL_MODE=@OLD_SQL_MODE;
 
175
End of 5.1 tests