~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/csv.result

  • Committer: Brian Aker
  • Date: 2009-02-10 00:14:40 UTC
  • Revision ID: brian@tangent.org-20090210001440-qjg8eofh3h93064b
Adding Multi-threaded Scheduler into the system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2,t3,t4;
2
 
CREATE TEMPORARY TABLE t1 (
 
2
CREATE TABLE t1 (
3
3
Period int DEFAULT 0 NOT NULL,
4
4
Varor_period int DEFAULT 0 NOT NULL
5
5
) ENGINE = CSV;
13
13
select t1.* from t1;
14
14
Period  Varor_period
15
15
9410    9412
16
 
CREATE TEMPORARY TABLE t2 (
 
16
CREATE TABLE t2 (
17
17
auto int not null,
18
18
fld1 int DEFAULT 0 NOT NULL,
19
19
companynr int DEFAULT 0 NOT NULL,
4915
4915
DROP TABLE t1;
4916
4916
ALTER TABLE t2 RENAME t1;
4917
4917
DROP TABLE t1;
4918
 
CREATE TEMPORARY TABLE t1 (
 
4918
CREATE TABLE t1 (
4919
4919
Period int DEFAULT 0 NOT NULL,
4920
4920
Varor_period int DEFAULT 0 NOT NULL
4921
4921
) ENGINE = CSV;
4929
4929
Note    1051    Unknown table 't3'
4930
4930
Note    1051    Unknown table 't4'
4931
4931
DROP TABLE IF EXISTS bug13894;
4932
 
CREATE TEMPORARY TABLE bug13894 ( val integer not null ) ENGINE = CSV;
 
4932
CREATE TABLE bug13894 ( val integer not null ) ENGINE = CSV;
4933
4933
INSERT INTO bug13894 VALUES (5);
4934
4934
INSERT INTO bug13894 VALUES (10);
4935
4935
INSERT INTO bug13894 VALUES (11);
4949
4949
11
4950
4950
DROP TABLE bug13894;
4951
4951
DROP TABLE IF EXISTS bug14672;
4952
 
CREATE TEMPORARY TABLE bug14672 (c1 integer not null) engine = CSV;
 
4952
CREATE TABLE bug14672 (c1 integer not null) engine = CSV;
4953
4953
INSERT INTO bug14672 VALUES (1), (2), (3);
4954
4954
SELECT * FROM bug14672;
4955
4955
c1
4975
4975
4
4976
4976
5
4977
4977
DROP TABLE bug14672;
4978
 
create temporary table t1 (a int not null) engine=csv;
 
4978
CREATE TABLE test_concurrent_insert ( val integer not null ) ENGINE = CSV;
 
4979
LOCK TABLES test_concurrent_insert READ LOCAL;
 
4980
INSERT INTO test_concurrent_insert VALUES (1);
 
4981
SELECT * FROM test_concurrent_insert;
 
4982
val
 
4983
1
 
4984
SELECT * FROM test_concurrent_insert;
 
4985
val
 
4986
UNLOCK TABLES;
 
4987
LOCK TABLES test_concurrent_insert WRITE;
 
4988
INSERT INTO test_concurrent_insert VALUES (2);
 
4989
SELECT * FROM test_concurrent_insert;
 
4990
val
 
4991
1
 
4992
2
 
4993
UNLOCK TABLES;
 
4994
DROP TABLE test_concurrent_insert;
 
4995
CREATE TABLE test_repair_table ( val integer not null ) ENGINE = CSV;
 
4996
CHECK TABLE test_repair_table;
 
4997
Table   Op      Msg_type        Msg_text
 
4998
test.test_repair_table  check   status  OK
 
4999
REPAIR TABLE test_repair_table;
 
5000
Table   Op      Msg_type        Msg_text
 
5001
test.test_repair_table  repair  status  OK
 
5002
DROP TABLE test_repair_table;
 
5003
CREATE TABLE test_repair_table2 ( val integer not null ) ENGINE = CSV;
 
5004
SELECT * from test_repair_table2;
 
5005
val
 
5006
Warnings:
 
5007
Error   1194    Table 'test_repair_table2' is marked as crashed and should be repaired
 
5008
SELECT * from test_repair_table2;
 
5009
val
 
5010
CHECK TABLE test_repair_table2;
 
5011
Table   Op      Msg_type        Msg_text
 
5012
test.test_repair_table2 check   status  OK
 
5013
DROP TABLE test_repair_table2;
 
5014
CREATE TABLE test_repair_table3 ( val integer not null ) ENGINE = CSV;
 
5015
CHECK TABLE test_repair_table3;
 
5016
Table   Op      Msg_type        Msg_text
 
5017
test.test_repair_table3 check   error   Corrupt
 
5018
REPAIR TABLE test_repair_table3;
 
5019
Table   Op      Msg_type        Msg_text
 
5020
test.test_repair_table3 repair  status  OK
 
5021
SELECT * FROM test_repair_table3;
 
5022
val
 
5023
1
 
5024
4
 
5025
DROP TABLE test_repair_table3;
 
5026
CREATE TABLE test_repair_table4 (
 
5027
num int not null,
 
5028
magic_no int DEFAULT 0 NOT NULL,
 
5029
company_name char(30) DEFAULT '' NOT NULL,
 
5030
founded char(4) DEFAULT '' NOT NULL
 
5031
) ENGINE = CSV;
 
5032
SELECT * FROM test_repair_table4;
 
5033
num     magic_no        company_name    founded
 
5034
Warnings:
 
5035
Error   1194    Table 'test_repair_table4' is marked as crashed and should be repaired
 
5036
SELECT * FROM test_repair_table4;
 
5037
num     magic_no        company_name    founded
 
5038
CHECK TABLE test_repair_table4;
 
5039
Table   Op      Msg_type        Msg_text
 
5040
test.test_repair_table4 check   status  OK
 
5041
INSERT INTO test_repair_table4 VALUES (2,101,'SAP','1972');
 
5042
INSERT INTO test_repair_table4 VALUES (1,101,'Microsoft','1978');
 
5043
INSERT INTO test_repair_table4 VALUES (2,101,'MySQL','1995');
 
5044
SELECT * FROM test_repair_table4;
 
5045
num     magic_no        company_name    founded
 
5046
2       101     SAP     1972
 
5047
1       101     Microsoft       1978
 
5048
2       101     MySQL   1995
 
5049
CHECK TABLE test_repair_table4;
 
5050
Table   Op      Msg_type        Msg_text
 
5051
test.test_repair_table4 check   status  OK
 
5052
REPAIR TABLE test_repair_table4;
 
5053
Table   Op      Msg_type        Msg_text
 
5054
test.test_repair_table4 repair  status  OK
 
5055
SELECT * FROM test_repair_table4;
 
5056
num     magic_no        company_name    founded
 
5057
2       101     SAP     1972
 
5058
1       101     Microsoft       1978
 
5059
2       101     MySQL   1995
 
5060
CHECK TABLE test_repair_table4;
 
5061
Table   Op      Msg_type        Msg_text
 
5062
test.test_repair_table4 check   status  OK
 
5063
REPAIR TABLE test_repair_table4;
 
5064
Table   Op      Msg_type        Msg_text
 
5065
test.test_repair_table4 repair  status  OK
 
5066
SELECT * FROM test_repair_table4;
 
5067
num     magic_no        company_name    founded
 
5068
2       101     SAP     1972
 
5069
1       101     Microsoft       1978
 
5070
2       101     MySQL   1995
 
5071
DROP TABLE test_repair_table4;
 
5072
CREATE TABLE test_repair_table5 (
 
5073
num int not null,
 
5074
magic_no int DEFAULT 0 NOT NULL,
 
5075
company_name char(30) DEFAULT '' NOT NULL,
 
5076
founded char(4) DEFAULT '' NOT NULL
 
5077
) ENGINE = CSV;
 
5078
CHECK TABLE test_repair_table5;
 
5079
Table   Op      Msg_type        Msg_text
 
5080
test.test_repair_table5 check   error   Corrupt
 
5081
REPAIR TABLE test_repair_table5;
 
5082
Table   Op      Msg_type        Msg_text
 
5083
test.test_repair_table5 repair  status  OK
 
5084
SELECT * FROM test_repair_table5;
 
5085
num     magic_no        company_name    founded
 
5086
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT", 1876);
 
5087
SELECT * FROM test_repair_table5;
 
5088
num     magic_no        company_name    founded
 
5089
1       102     CORRECT 1876
 
5090
FLUSH TABLES;
 
5091
CHECK TABLE test_repair_table5;
 
5092
Table   Op      Msg_type        Msg_text
 
5093
test.test_repair_table5 check   error   Corrupt
 
5094
REPAIR TABLE test_repair_table5;
 
5095
Table   Op      Msg_type        Msg_text
 
5096
test.test_repair_table5 repair  status  OK
 
5097
SELECT * FROM test_repair_table5;
 
5098
num     magic_no        company_name    founded
 
5099
1       102     CORRECT 1876
 
5100
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT2", 1876);
 
5101
SELECT * FROM test_repair_table5;
 
5102
num     magic_no        company_name    founded
 
5103
1       102     CORRECT 1876
 
5104
1       102     CORRECT2        1876
 
5105
FLUSH TABLES;
 
5106
CHECK TABLE test_repair_table5;
 
5107
Table   Op      Msg_type        Msg_text
 
5108
test.test_repair_table5 check   error   Corrupt
 
5109
REPAIR TABLE test_repair_table5;
 
5110
Table   Op      Msg_type        Msg_text
 
5111
test.test_repair_table5 repair  status  OK
 
5112
SELECT * FROM test_repair_table5;
 
5113
num     magic_no        company_name    founded
 
5114
1       102     CORRECT 1876
 
5115
1       102     CORRECT2        1876
 
5116
DROP TABLE test_repair_table5;
 
5117
create table t1 (a int not null) engine=csv;
4979
5118
insert t1 values (1);
4980
5119
delete from t1;
4981
5120
affected rows: 1
4999
5138
truncate table t1;
5000
5139
affected rows: 5
5001
5140
drop table t1;
5002
 
create temporary table float_test (id float not null,string varchar(64) not null) Engine=CSV;
 
5141
create table t1 (v varchar(32) not null);
 
5142
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
 
5143
select * from t1;
 
5144
v
 
5145
def
 
5146
abc
 
5147
hij
 
5148
3r4f
 
5149
alter table t1 change v v2 varchar(32);
 
5150
select * from t1;
 
5151
v2
 
5152
def
 
5153
abc
 
5154
hij
 
5155
3r4f
 
5156
alter table t1 change v2 v varchar(64);
 
5157
select * from t1;
 
5158
v
 
5159
def
 
5160
abc
 
5161
hij
 
5162
3r4f
 
5163
update t1 set v = 'lmn' where v = 'hij';
 
5164
select * from t1;
 
5165
v
 
5166
def
 
5167
abc
 
5168
lmn
 
5169
3r4f
 
5170
alter table t1 add i int auto_increment not null primary key first;
 
5171
select * from t1;
 
5172
i       v
 
5173
1       def
 
5174
2       abc
 
5175
3       lmn
 
5176
4       3r4f
 
5177
update t1 set i=5 where i=3;
 
5178
select * from t1;
 
5179
i       v
 
5180
1       def
 
5181
2       abc
 
5182
4       3r4f
 
5183
5       lmn
 
5184
alter table t1 change i i bigint;
 
5185
select * from t1;
 
5186
i       v
 
5187
1       def
 
5188
2       abc
 
5189
4       3r4f
 
5190
5       lmn
 
5191
alter table t1 add unique key (i, v);
 
5192
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
 
5193
i       v
 
5194
4       3r4f
 
5195
drop table t1;
 
5196
create table bug22080_1 (id int not null,string varchar(64) not null) Engine=CSV;
 
5197
create table bug22080_2 (id int not null,string varchar(64) not null) Engine=CSV;
 
5198
create table bug22080_3 (id int not null,string varchar(64) not null) Engine=CSV;
 
5199
insert into bug22080_1 values(1,'string');
 
5200
insert into bug22080_1 values(2,'string');
 
5201
insert into bug22080_1 values(3,'string');
 
5202
check table bug22080_2;
 
5203
Table   Op      Msg_type        Msg_text
 
5204
test.bug22080_2 check   error   Corrupt
 
5205
check table bug22080_3;
 
5206
Table   Op      Msg_type        Msg_text
 
5207
test.bug22080_3 check   error   Corrupt
 
5208
drop tables bug22080_1,bug22080_2,bug22080_3;
 
5209
create table float_test (id float not null,string varchar(64) not null) Engine=CSV;
5003
5210
insert into float_test values(1.0,'string');
5004
5211
insert into float_test values(2.23,'serg.g');
5005
5212
insert into float_test values(0.03,'string');
5015
5222
0.67    string
5016
5223
9.67    string
5017
5224
drop table float_test;
5018
 
CREATE TEMPORARY TABLE `bug21328` (
 
5225
CREATE TABLE `bug21328` (
5019
5226
`col1` int NOT NULL,
5020
5227
`col2` int NOT NULL,
5021
5228
`col3` int NOT NULL
5023
5230
insert into bug21328 values (1,0,0);
5024
5231
alter table bug21328 engine=myisam;
5025
5232
drop table bug21328;
5026
 
create temporary table t1(a blob not null, b int not null) engine=csv;
 
5233
create table t1(a blob not null, b int not null) engine=csv;
5027
5234
insert into t1 values('a', 1);
5028
5235
flush tables;
5029
5236
update t1 set b=2;
5031
5238
a       b
5032
5239
a       2
5033
5240
drop table t1;
5034
 
create temporary table t1(a int not null) engine=csv;
 
5241
create table t1(a int not null) engine=csv;
5035
5242
insert into t1 values(-1), (-123.34), (2), (-23);
5036
5243
select * from t1;
5037
5244
a
5043
5250
Table   Op      Msg_type        Msg_text
5044
5251
test.t1 check   status  OK
5045
5252
drop table t1;
5046
 
create temporary table t1(a int not null) engine=csv;
 
5253
create table t1(a int not null, b int not null) engine=csv;
 
5254
repair table t1;
 
5255
Table   Op      Msg_type        Msg_text
 
5256
test.t1 repair  Warning Data truncated for column 'a' at row 5
 
5257
test.t1 repair  status  OK
 
5258
check table t1;
 
5259
Table   Op      Msg_type        Msg_text
 
5260
test.t1 check   status  OK
 
5261
select * from t1;
 
5262
a       b
 
5263
1       0
 
5264
-200    1
 
5265
-1      -1
 
5266
-1      -100
 
5267
check table t1;
 
5268
Table   Op      Msg_type        Msg_text
 
5269
test.t1 check   status  OK
 
5270
drop table t1;
 
5271
create table t1(a int not null) engine=csv;
5047
5272
insert into t1 values (0), (1), (2);
5048
5273
delete from t1 limit 2;
5049
5274
check table t1;
5059
5284
select * from t1;
5060
5285
a
5061
5286
drop table t1;
5062
 
create temporary table t1(a datetime not null) engine=csv;
5063
 
insert into t1 values();
5064
 
ERROR HY000: Field 'a' doesn't have a default value
5065
 
select * from t1;
5066
 
a
5067
 
drop table t1;
5068
 
create temporary table t1(a varchar(32) not null) engine=csv;
5069
 
insert into t1 values();
5070
 
ERROR HY000: Field 'a' doesn't have a default value
5071
 
select * from t1;
5072
 
a
5073
 
drop table t1;
5074
 
create temporary table t1(a int not null) engine=csv;
5075
 
insert into t1 values();
5076
 
ERROR HY000: Field 'a' doesn't have a default value
5077
 
select * from t1;
5078
 
a
5079
 
drop table t1;
5080
 
create temporary table t1(a blob not null) engine=csv;
5081
 
insert into t1 values();
5082
 
ERROR HY000: Field 'a' doesn't have a default value
5083
 
select * from t1;
5084
 
a
5085
 
drop table t1;
5086
 
create temporary table t1(a enum('foo','bar') default null) engine=csv;
5087
 
ERROR 42000: The storage engine for the table doesn't support nullable columns
5088
 
create temporary table t1(a enum('foo','bar') default 'foo') engine=csv;
5089
 
ERROR 42000: The storage engine for the table doesn't support nullable columns
5090
 
create temporary table t1(a enum('foo','bar') default 'foo' not null) engine=csv;
 
5287
create table t1(a datetime not null) engine=csv;
 
5288
insert into t1 values();
 
5289
ERROR HY000: Field 'a' doesn't have a default value
 
5290
select * from t1;
 
5291
a
 
5292
drop table t1;
 
5293
create table t1(a varchar(32) not null) engine=csv;
 
5294
insert into t1 values();
 
5295
ERROR HY000: Field 'a' doesn't have a default value
 
5296
select * from t1;
 
5297
a
 
5298
drop table t1;
 
5299
create table t1(a int not null) engine=csv;
 
5300
insert into t1 values();
 
5301
ERROR HY000: Field 'a' doesn't have a default value
 
5302
select * from t1;
 
5303
a
 
5304
drop table t1;
 
5305
create table t1(a blob not null) engine=csv;
 
5306
insert into t1 values();
 
5307
ERROR HY000: Field 'a' doesn't have a default value
 
5308
select * from t1;
 
5309
a
 
5310
drop table t1;
 
5311
create table t1(a enum('foo','bar') default null) engine=csv;
 
5312
ERROR 42000: The storage engine for the table doesn't support nullable columns
 
5313
create table t1(a enum('foo','bar') default 'foo') engine=csv;
 
5314
ERROR 42000: The storage engine for the table doesn't support nullable columns
 
5315
create table t1(a enum('foo','bar') default 'foo' not null) engine=csv;
5091
5316
insert into t1 values();
5092
5317
select * from t1;
5093
5318
a
5094
5319
foo
5095
5320
drop table t1;
5096
 
CREATE TEMPORARY TABLE t1(a INT) ENGINE=CSV;
 
5321
CREATE TABLE t1(a INT) ENGINE=CSV;
5097
5322
ERROR 42000: The storage engine for the table doesn't support nullable columns
5098
5323
SHOW WARNINGS;
5099
5324
Level   Code    Message
5100
5325
Error   1178    The storage engine for the table doesn't support nullable columns
5101
 
Error   1005    Can't create table 'test.#t1' (errno: 138)
5102
 
create temporary table t1 (c1 blob not null) engine=csv;
 
5326
Error   1005    Can't create table 'test.t1' (errno: 138)
 
5327
create table t1 (c1 blob not null) engine=csv;
5103
5328
insert into t1 values("This");
5104
5329
update t1 set c1="That" where c1="This";
5105
5330
affected rows: 1
5109
5334
That
5110
5335
drop table t1;
5111
5336
drop table if exists t1;
 
5337
create table t1 (val int not null) engine=csv;
 
5338
select * from t1;
 
5339
ERROR HY000: Can't find file: 't1' (errno: 2)
5112
5340
End of 5.1 tests