1
drop table if exists t1,t2,t3,t4;
3
Period int DEFAULT 0 NOT NULL,
4
Varor_period int DEFAULT 0 NOT NULL
6
INSERT INTO t1 VALUES (9410,9412);
18
fld1 int DEFAULT 0 NOT NULL,
19
companynr int DEFAULT 0 NOT NULL,
20
fld3 char(30) DEFAULT '' NOT NULL,
21
fld4 char(35) DEFAULT '' NOT NULL,
22
fld5 char(35) DEFAULT '' NOT NULL,
23
fld6 char(4) DEFAULT '' NOT NULL
25
select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
28
select fld3 from t2 where fld3 like "%cultivation" ;
31
select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
56
select fld3,companynr from t2 where companynr = 58 order by fld3;
81
select fld3 from t2 order by fld3 desc limit 10;
93
select fld3 from t2 order by fld3 desc limit 5;
100
select fld3 from t2 order by fld3 desc limit 5,5;
107
UPDATE t2 SET fld3="foo" WHERE fld3="b%";
871
electroencephalography
1309
UPDATE t2 SET fld3="bar" WHERE fld3="s%";
1310
select fld3 from t2;
2073
electroencephalography
2511
DELETE FROM t2 WHERE fld3="r%";
2512
SELECT fld3 FROM t2;
3275
electroencephalography
3713
DELETE FROM t2 WHERE fld3="d%" ORDER BY RAND();
3714
SELECT fld3 FROM t2;
4477
electroencephalography
4916
ALTER TABLE t2 RENAME t1;
4919
Period int DEFAULT 0 NOT NULL,
4920
Varor_period int DEFAULT 0 NOT NULL
4922
INSERT INTO t1 VALUES (9410,9412);
4923
select period from t1;
4926
drop table if exists t1,t2,t3,t4;
4928
Note 1051 Unknown table 't2'
4929
Note 1051 Unknown table 't3'
4930
Note 1051 Unknown table 't4'
4931
DROP TABLE IF EXISTS bug13894;
4932
CREATE TABLE bug13894 ( val integer not null ) ENGINE = CSV;
4933
INSERT INTO bug13894 VALUES (5);
4934
INSERT INTO bug13894 VALUES (10);
4935
INSERT INTO bug13894 VALUES (11);
4936
INSERT INTO bug13894 VALUES (10);
4937
SELECT * FROM bug13894;
4943
UPDATE bug13894 SET val=6 WHERE val=10;
4944
SELECT * FROM bug13894;
4950
DROP TABLE bug13894;
4951
DROP TABLE IF EXISTS bug14672;
4952
CREATE TABLE bug14672 (c1 integer not null) engine = CSV;
4953
INSERT INTO bug14672 VALUES (1), (2), (3);
4954
SELECT * FROM bug14672;
4959
DELETE FROM bug14672 WHERE c1 = 2;
4960
SELECT * FROM bug14672;
4964
INSERT INTO bug14672 VALUES (4);
4965
SELECT * FROM bug14672;
4970
INSERT INTO bug14672 VALUES (5);
4971
SELECT * FROM bug14672;
4977
DROP TABLE bug14672;
4978
CREATE TABLE test_repair_table ( val integer not null ) ENGINE = CSV;
4979
CHECK TABLE test_repair_table;
4980
Table Op Msg_type Msg_text
4981
test.test_repair_table check status OK
4982
REPAIR TABLE test_repair_table;
4983
Table Op Msg_type Msg_text
4984
test.test_repair_table repair status OK
4985
DROP TABLE test_repair_table;
4986
CREATE TABLE test_repair_table2 ( val integer not null ) ENGINE = CSV;
4987
SELECT * from test_repair_table2;
4990
Error 1194 Table 'test_repair_table2' is marked as crashed and should be repaired
4991
SELECT * from test_repair_table2;
4993
CHECK TABLE test_repair_table2;
4994
Table Op Msg_type Msg_text
4995
test.test_repair_table2 check status OK
4996
DROP TABLE test_repair_table2;
4997
CREATE TABLE test_repair_table3 ( val integer not null ) ENGINE = CSV;
4998
CHECK TABLE test_repair_table3;
4999
Table Op Msg_type Msg_text
5000
test.test_repair_table3 check error Corrupt
5001
REPAIR TABLE test_repair_table3;
5002
Table Op Msg_type Msg_text
5003
test.test_repair_table3 repair status OK
5004
SELECT * FROM test_repair_table3;
5008
DROP TABLE test_repair_table3;
5009
CREATE TABLE test_repair_table4 (
5011
magic_no int DEFAULT 0 NOT NULL,
5012
company_name char(30) DEFAULT '' NOT NULL,
5013
founded char(4) DEFAULT '' NOT NULL
5015
SELECT * FROM test_repair_table4;
5016
num magic_no company_name founded
5018
Error 1194 Table 'test_repair_table4' is marked as crashed and should be repaired
5019
SELECT * FROM test_repair_table4;
5020
num magic_no company_name founded
5021
CHECK TABLE test_repair_table4;
5022
Table Op Msg_type Msg_text
5023
test.test_repair_table4 check status OK
5024
INSERT INTO test_repair_table4 VALUES (2,101,'SAP','1972');
5025
INSERT INTO test_repair_table4 VALUES (1,101,'Microsoft','1978');
5026
INSERT INTO test_repair_table4 VALUES (2,101,'MySQL','1995');
5027
SELECT * FROM test_repair_table4;
5028
num magic_no company_name founded
5030
1 101 Microsoft 1978
5032
CHECK TABLE test_repair_table4;
5033
Table Op Msg_type Msg_text
5034
test.test_repair_table4 check status OK
5035
REPAIR TABLE test_repair_table4;
5036
Table Op Msg_type Msg_text
5037
test.test_repair_table4 repair status OK
5038
SELECT * FROM test_repair_table4;
5039
num magic_no company_name founded
5041
1 101 Microsoft 1978
5043
CHECK TABLE test_repair_table4;
5044
Table Op Msg_type Msg_text
5045
test.test_repair_table4 check status OK
5046
REPAIR TABLE test_repair_table4;
5047
Table Op Msg_type Msg_text
5048
test.test_repair_table4 repair status OK
5049
SELECT * FROM test_repair_table4;
5050
num magic_no company_name founded
5052
1 101 Microsoft 1978
5054
DROP TABLE test_repair_table4;
5055
CREATE TABLE test_repair_table5 (
5057
magic_no int DEFAULT 0 NOT NULL,
5058
company_name char(30) DEFAULT '' NOT NULL,
5059
founded char(4) DEFAULT '' NOT NULL
5061
CHECK TABLE test_repair_table5;
5062
Table Op Msg_type Msg_text
5063
test.test_repair_table5 check error Corrupt
5064
REPAIR TABLE test_repair_table5;
5065
Table Op Msg_type Msg_text
5066
test.test_repair_table5 repair status OK
5067
SELECT * FROM test_repair_table5;
5068
num magic_no company_name founded
5069
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT", 1876);
5070
SELECT * FROM test_repair_table5;
5071
num magic_no company_name founded
5074
CHECK TABLE test_repair_table5;
5075
Table Op Msg_type Msg_text
5076
test.test_repair_table5 check error Corrupt
5077
REPAIR TABLE test_repair_table5;
5078
Table Op Msg_type Msg_text
5079
test.test_repair_table5 repair status OK
5080
SELECT * FROM test_repair_table5;
5081
num magic_no company_name founded
5083
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT2", 1876);
5084
SELECT * FROM test_repair_table5;
5085
num magic_no company_name founded
5089
CHECK TABLE test_repair_table5;
5090
Table Op Msg_type Msg_text
5091
test.test_repair_table5 check error Corrupt
5092
REPAIR TABLE test_repair_table5;
5093
Table Op Msg_type Msg_text
5094
test.test_repair_table5 repair status OK
5095
SELECT * FROM test_repair_table5;
5096
num magic_no company_name founded
5099
DROP TABLE test_repair_table5;
5100
create table t1 (a int not null) engine=csv;
5101
insert t1 values (1);
5106
insert t1 values (1),(2);
5109
insert t1 values (1),(2),(3);
5113
insert t1 values (1),(2),(3),(4);
5115
select count(*) from t1;
5120
insert t1 values (1),(2),(3),(4),(5);
5124
create table t1 (v varchar(32) not null);
5125
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
5132
alter table t1 change v v2 varchar(32);
5139
alter table t1 change v2 v varchar(64);
5146
update t1 set v = 'lmn' where v = 'hij';
5153
alter table t1 add i int auto_increment not null primary key first;
5160
update t1 set i=5 where i=3;
5167
alter table t1 change i i bigint;
5174
alter table t1 add unique key (i, v);
5175
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
5179
create table bug22080_1 (id int not null,string varchar(64) not null) Engine=CSV;
5180
create table bug22080_2 (id int not null,string varchar(64) not null) Engine=CSV;
5181
create table bug22080_3 (id int not null,string varchar(64) not null) Engine=CSV;
5182
insert into bug22080_1 values(1,'string');
5183
insert into bug22080_1 values(2,'string');
5184
insert into bug22080_1 values(3,'string');
5185
check table bug22080_2;
5186
Table Op Msg_type Msg_text
5187
test.bug22080_2 check error Corrupt
5188
check table bug22080_3;
5189
Table Op Msg_type Msg_text
5190
test.bug22080_3 check error Corrupt
5191
drop tables bug22080_1,bug22080_2,bug22080_3;
5192
create table float_test (id float not null,string varchar(64) not null) Engine=CSV;
5193
insert into float_test values(1.0,'string');
5194
insert into float_test values(2.23,'serg.g');
5195
insert into float_test values(0.03,'string');
5196
insert into float_test values(0.19,'string');
5197
insert into float_test values(.67,'string');
5198
insert into float_test values(9.67,'string');
5199
select * from float_test;
5207
drop table float_test;
5208
CREATE TABLE `bug21328` (
5209
`col1` int NOT NULL,
5210
`col2` int NOT NULL,
5213
insert into bug21328 values (1,0,0);
5214
alter table bug21328 engine=myisam;
5215
drop table bug21328;
5216
create table t1(a blob not null, b int not null) engine=csv;
5217
insert into t1 values('a', 1);
5224
create table t1(a int not null) engine=csv;
5225
insert into t1 values(-1), (-123.34), (2), (-23);
5233
Table Op Msg_type Msg_text
5234
test.t1 check status OK
5236
create table t1(a int not null, b int not null) engine=csv;
5238
Table Op Msg_type Msg_text
5239
test.t1 repair Warning Data truncated for column 'a' at row 5
5240
test.t1 repair status OK
5242
Table Op Msg_type Msg_text
5243
test.t1 check status OK
5251
Table Op Msg_type Msg_text
5252
test.t1 check status OK
5254
create table t1(a int not null) engine=csv;
5255
insert into t1 values (0), (1), (2);
5256
delete from t1 limit 2;
5258
Table Op Msg_type Msg_text
5259
test.t1 check status OK
5265
Table Op Msg_type Msg_text
5266
test.t1 check status OK
5270
create table t1(a datetime not null) engine=csv;
5271
insert into t1 values();
5272
ERROR HY000: Field 'a' doesn't have a default value
5276
create table t1(a varchar(32) not null) engine=csv;
5277
insert into t1 values();
5278
ERROR HY000: Field 'a' doesn't have a default value
5282
create table t1(a int not null) engine=csv;
5283
insert into t1 values();
5284
ERROR HY000: Field 'a' doesn't have a default value
5288
create table t1(a blob not null) engine=csv;
5289
insert into t1 values();
5290
ERROR HY000: Field 'a' doesn't have a default value
5294
create table t1(a enum('foo','bar') default null) engine=csv;
5295
ERROR 42000: The storage engine for the table doesn't support nullable columns
5296
create table t1(a enum('foo','bar') default 'foo') engine=csv;
5297
ERROR 42000: The storage engine for the table doesn't support nullable columns
5298
create table t1(a enum('foo','bar') default 'foo' not null) engine=csv;
5299
insert into t1 values();
5304
CREATE TABLE t1(a INT) ENGINE=CSV;
5305
ERROR 42000: The storage engine for the table doesn't support nullable columns
5308
Error 1178 The storage engine for the table doesn't support nullable columns
5309
Error 1005 Can't create table 'test.t1' (errno: 138)
5310
create table t1 (c1 blob not null) engine=csv;
5311
insert into t1 values("This");
5312
update t1 set c1="That" where c1="This";
5314
info: Rows matched: 1 Changed: 1 Warnings: 0
5319
drop table if exists t1;
5320
create table t1 (val int not null) engine=csv;
5322
ERROR HY000: Can't find file: 't1' (errno: 2)