summaryrefslogtreecommitdiff
path: root/mysql-test/r/csv.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/csv.result')
-rw-r--r--mysql-test/r/csv.result237
1 files changed, 234 insertions, 3 deletions
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index 8ec79e9d7a9..ede5d9a32fd 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -4943,10 +4943,10 @@ val
UPDATE bug13894 SET val=6 WHERE val=10;
SELECT * FROM bug13894;
val
-5
-11
6
6
+5
+11
DROP TABLE bug13894;
DROP TABLE IF EXISTS bug14672;
CREATE TABLE bug14672 (c1 integer) engine = CSV;
@@ -4975,6 +4975,145 @@ c1
4
5
DROP TABLE bug14672;
+CREATE TABLE test_concurrent_insert ( val integer ) ENGINE = CSV;
+LOCK TABLES test_concurrent_insert READ LOCAL;
+INSERT INTO test_concurrent_insert VALUES (1);
+SELECT * FROM test_concurrent_insert;
+val
+1
+SELECT * FROM test_concurrent_insert;
+val
+UNLOCK TABLES;
+LOCK TABLES test_concurrent_insert WRITE;
+INSERT INTO test_concurrent_insert VALUES (2);
+SELECT * FROM test_concurrent_insert;
+val
+1
+2
+UNLOCK TABLES;
+DROP TABLE test_concurrent_insert;
+CREATE TABLE test_repair_table ( val integer ) ENGINE = CSV;
+CHECK TABLE test_repair_table;
+Table Op Msg_type Msg_text
+test.test_repair_table check status OK
+REPAIR TABLE test_repair_table;
+Table Op Msg_type Msg_text
+test.test_repair_table repair status OK
+DROP TABLE test_repair_table;
+CREATE TABLE test_repair_table2 ( val integer ) ENGINE = CSV;
+SELECT * from test_repair_table2;
+val
+Warnings:
+Error 1194 Table 'test_repair_table2' is marked as crashed and should be repaired
+SELECT * from test_repair_table2;
+val
+CHECK TABLE test_repair_table2;
+Table Op Msg_type Msg_text
+test.test_repair_table2 check status OK
+DROP TABLE test_repair_table2;
+CREATE TABLE test_repair_table3 ( val integer ) ENGINE = CSV;
+CHECK TABLE test_repair_table3;
+Table Op Msg_type Msg_text
+test.test_repair_table3 check error Corrupt
+REPAIR TABLE test_repair_table3;
+Table Op Msg_type Msg_text
+test.test_repair_table3 repair status OK
+SELECT * FROM test_repair_table3;
+val
+1
+4
+DROP TABLE test_repair_table3;
+CREATE TABLE test_repair_table4 (
+num int not null,
+magic_no int(4) unsigned zerofill DEFAULT '0000' NOT NULL,
+company_name char(30) DEFAULT '' NOT NULL,
+founded char(4) DEFAULT '' NOT NULL
+) ENGINE = CSV;
+SELECT * FROM test_repair_table4;
+num magic_no company_name founded
+Warnings:
+Error 1194 Table 'test_repair_table4' is marked as crashed and should be repaired
+SELECT * FROM test_repair_table4;
+num magic_no company_name founded
+CHECK TABLE test_repair_table4;
+Table Op Msg_type Msg_text
+test.test_repair_table4 check status OK
+INSERT INTO test_repair_table4 VALUES (2,101,'SAP','1972');
+INSERT INTO test_repair_table4 VALUES (1,101,'Microsoft','1978');
+INSERT INTO test_repair_table4 VALUES (2,101,'MySQL','1995');
+SELECT * FROM test_repair_table4;
+num magic_no company_name founded
+2 0101 SAP 1972
+1 0101 Microsoft 1978
+2 0101 MySQL 1995
+CHECK TABLE test_repair_table4;
+Table Op Msg_type Msg_text
+test.test_repair_table4 check status OK
+REPAIR TABLE test_repair_table4;
+Table Op Msg_type Msg_text
+test.test_repair_table4 repair status OK
+SELECT * FROM test_repair_table4;
+num magic_no company_name founded
+2 0101 SAP 1972
+1 0101 Microsoft 1978
+2 0101 MySQL 1995
+CHECK TABLE test_repair_table4;
+Table Op Msg_type Msg_text
+test.test_repair_table4 check status OK
+REPAIR TABLE test_repair_table4;
+Table Op Msg_type Msg_text
+test.test_repair_table4 repair status OK
+SELECT * FROM test_repair_table4;
+num magic_no company_name founded
+2 0101 SAP 1972
+1 0101 Microsoft 1978
+2 0101 MySQL 1995
+DROP TABLE test_repair_table4;
+CREATE TABLE test_repair_table5 (
+num int not null,
+magic_no int(4) unsigned zerofill DEFAULT '0000' NOT NULL,
+company_name char(30) DEFAULT '' NOT NULL,
+founded char(4) DEFAULT '' NOT NULL
+) ENGINE = CSV;
+CHECK TABLE test_repair_table5;
+Table Op Msg_type Msg_text
+test.test_repair_table5 check error Corrupt
+REPAIR TABLE test_repair_table5;
+Table Op Msg_type Msg_text
+test.test_repair_table5 repair status OK
+SELECT * FROM test_repair_table5;
+num magic_no company_name founded
+INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT", 1876);
+SELECT * FROM test_repair_table5;
+num magic_no company_name founded
+1 0102 CORRECT 1876
+FLUSH TABLES;
+CHECK TABLE test_repair_table5;
+Table Op Msg_type Msg_text
+test.test_repair_table5 check error Corrupt
+REPAIR TABLE test_repair_table5;
+Table Op Msg_type Msg_text
+test.test_repair_table5 repair status OK
+SELECT * FROM test_repair_table5;
+num magic_no company_name founded
+1 0102 CORRECT 1876
+INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT2", 1876);
+SELECT * FROM test_repair_table5;
+num magic_no company_name founded
+1 0102 CORRECT 1876
+1 0102 CORRECT2 1876
+FLUSH TABLES;
+CHECK TABLE test_repair_table5;
+Table Op Msg_type Msg_text
+test.test_repair_table5 check error Corrupt
+REPAIR TABLE test_repair_table5;
+Table Op Msg_type Msg_text
+test.test_repair_table5 repair status OK
+SELECT * FROM test_repair_table5;
+num magic_no company_name founded
+1 0102 CORRECT 1876
+1 0102 CORRECT2 1876
+DROP TABLE test_repair_table5;
create table t1 (a int) engine=csv;
insert t1 values (1);
delete from t1;
@@ -4999,13 +5138,105 @@ insert t1 values (1),(2),(3),(4),(5);
truncate table t1;
affected rows: 0
drop table t1;
+create table t1 (v varchar(32));
+insert into t1 values ('def'),('abc'),('hij'),('3r4f');
+select * from t1;
+v
+def
+abc
+hij
+3r4f
+alter table t1 change v v2 varchar(32);
+select * from t1;
+v2
+def
+abc
+hij
+3r4f
+alter table t1 change v2 v varchar(64);
+select * from t1;
+v
+def
+abc
+hij
+3r4f
+update t1 set v = 'lmn' where v = 'hij';
+select * from t1;
+v
+def
+abc
+lmn
+3r4f
+alter table t1 add i int auto_increment not null primary key first;
+select * from t1;
+i v
+1 def
+2 abc
+3 lmn
+4 3r4f
+update t1 set i=5 where i=3;
+select * from t1;
+i v
+1 def
+2 abc
+5 lmn
+4 3r4f
+alter table t1 change i i bigint;
+select * from t1;
+i v
+1 def
+2 abc
+5 lmn
+4 3r4f
+alter table t1 add unique key (i, v);
+select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
+i v
+4 3r4f
+drop table t1;
create table bug15205 (val int(11) default null) engine=csv;
create table bug15205_2 (val int(11) default null) engine=csv;
select * from bug15205;
-ERROR HY000: Got error 1 from storage engine
+ERROR HY000: Can't get stat of './test/bug15205.CSV' (Errcode: 2)
select * from bug15205_2;
val
select * from bug15205;
val
drop table bug15205;
drop table bug15205_2;
+create table bug22080_1 (id int,string varchar(64)) Engine=CSV;
+create table bug22080_2 (id int,string varchar(64)) Engine=CSV;
+create table bug22080_3 (id int,string varchar(64)) Engine=CSV;
+insert into bug22080_1 values(1,'string');
+insert into bug22080_1 values(2,'string');
+insert into bug22080_1 values(3,'string');
+check table bug22080_2;
+Table Op Msg_type Msg_text
+test.bug22080_2 check error Corrupt
+check table bug22080_3;
+Table Op Msg_type Msg_text
+test.bug22080_3 check error Corrupt
+drop tables bug22080_1,bug22080_2,bug22080_3;
+create table float_test (id float,string varchar(64)) Engine=CSV;
+insert into float_test values(1.0,'string');
+insert into float_test values(2.23,'serg.g');
+insert into float_test values(0.03,'string');
+insert into float_test values(0.19,'string');
+insert into float_test values(.67,'string');
+insert into float_test values(9.67,'string');
+select * from float_test;
+id string
+1 string
+2.23 serg.g
+0.03 string
+0.19 string
+0.67 string
+9.67 string
+drop table float_test;
+CREATE TABLE `bug21328` (
+`col1` int(11) DEFAULT NULL,
+`col2` int(11) DEFAULT NULL,
+`col3` int(11) DEFAULT NULL
+) ENGINE=CSV;
+insert into bug21328 values (1,NULL,NULL);
+alter table bug21328 engine=myisam;
+drop table bug21328;