16
Period int(4) zerofill DEFAULT '0000' NOT NULL,
17
Varor_period int(4) DEFAULT '0' NOT NULL
16
Period int DEFAULT 0 NOT NULL,
17
Varor_period int DEFAULT 0 NOT NULL
20
20
INSERT INTO t1 VALUES (9410,9412);
32
fld1 int(6) zerofill DEFAULT '000000' NOT NULL,
33
companynr int(2) zerofill DEFAULT '00' NOT NULL,
32
fld1 int DEFAULT 0 NOT NULL,
33
companynr int DEFAULT 0 NOT NULL,
34
34
fld3 char(30) DEFAULT '' NOT NULL,
35
35
fld4 char(35) DEFAULT '' NOT NULL,
36
36
fld5 char(35) DEFAULT '' NOT NULL,
44
44
--disable_query_log
45
46
INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat','');
46
47
INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W');
47
48
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
1241
1242
INSERT INTO t2 VALUES (1191,068504,00,'bonfire','corresponds','positively','');
1242
1243
INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky','');
1243
1244
INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly','');
1244
1246
--enable_query_log
1306
1308
CREATE TABLE t1 (
1307
Period int(4) zerofill DEFAULT '0000' NOT NULL,
1308
Varor_period int(4) DEFAULT '0' NOT NULL
1309
Period int DEFAULT 0 NOT NULL,
1310
Varor_period int DEFAULT 0 NOT NULL
1309
1311
) ENGINE = CSV;
1311
1313
INSERT INTO t1 VALUES (9410,9412);
1440
1442
CREATE TABLE test_repair_table4 (
1441
1443
num int not null,
1442
magic_no int(4) zerofill DEFAULT '0000' NOT NULL,
1444
magic_no int DEFAULT 0 NOT NULL,
1443
1445
company_name char(30) DEFAULT '' NOT NULL,
1444
1446
founded char(4) DEFAULT '' NOT NULL
1445
1447
) ENGINE = CSV;
1472
1474
CREATE TABLE test_repair_table5 (
1473
1475
num int not null,
1474
magic_no int(4) zerofill DEFAULT '0000' NOT NULL,
1476
magic_no int DEFAULT 0 NOT NULL,
1475
1477
company_name char(30) DEFAULT '' NOT NULL,
1476
1478
founded char(4) DEFAULT '' NOT NULL
1477
1479
) ENGINE = CSV;
1583
1585
# resulted in scanning through deleted memory and we were geting a crash.
1584
1586
# that's why we need two tables in the bugtest
1586
create table bug15205 (val int(11) not null) engine=csv;
1587
create table bug15205_2 (val int(11) not null) engine=csv;
1588
--remove_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
1589
# system error (can't open the datafile)
1590
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
1592
select * from bug15205;
1593
select * from bug15205_2;
1595
--write_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
1597
select * from bug15205;
1598
drop table bug15205;
1599
drop table bug15205_2;
1603
# Bug#28862 "Extended Latin1 characters get lost in CVS engine"
1607
c varchar(1) not null,
1608
name varchar(64) not null
1609
) character set latin1 engine=csv;
1610
insert into t1 values (0xC0,'LATIN CAPITAL LETTER A WITH GRAVE');
1611
insert into t1 values (0xE0,'LATIN SMALL LETTER A WITH GRAVE');
1612
insert into t1 values (0xEE,'LATIN SMALL LETTER I WITH CIRCUMFLEX');
1613
insert into t1 values (0xFE,'LATIN SMALL LETTER THORN');
1614
insert into t1 values (0xF7,'DIVISION SIGN');
1615
insert into t1 values (0xFF,'LATIN SMALL LETTER Y WITH DIAERESIS');
1616
select hex(c), c, name from t1 order by 1;
1619
--echo End of 5.0 tests
1588
# TODO: Bug lp:311104
1589
#create table bug15205 (val int not null) engine=csv;
1590
#create table bug15205_2 (val int not null) engine=csv;
1591
#--remove_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
1592
## system error (can't open the datafile)
1593
#--replace_result $MYSQLTEST_VARDIR . master-data/ ''
1595
#select * from bug15205;
1596
#select * from bug15205_2;
1597
## Create empty file
1598
#--write_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
1600
#select * from bug15205;
1601
#drop table bug15205;
1602
#drop table bug15205_2;
1731
1714
# Bug #31473: does not work with NULL value in datetime field
1733
1716
create table t1(a datetime not null) engine=csv;
1734
insert into t1 values();
1737
create table t1(a set('foo','bar') not null) engine=csv;
1738
1718
insert into t1 values();
1739
1719
select * from t1;
1741
1721
create table t1(a varchar(32) not null) engine=csv;
1742
1723
insert into t1 values();
1743
1724
select * from t1;
1745
1726
create table t1(a int not null) engine=csv;
1746
1728
insert into t1 values();
1747
1729
select * from t1;
1749
1731
create table t1(a blob not null) engine=csv;
1750
1733
insert into t1 values();
1751
1734
select * from t1;
1753
create table t1(a bit(1) not null) engine=csv;
1754
insert into t1 values();
1755
select BIN(a) from t1;
1757
1736
# We prevent creation of table with nullable ENUM
1758
1737
--error ER_CHECK_NOT_IMPLEMENTED
1759
1738
create table t1(a enum('foo','bar') default null) engine=csv;