16
Period int DEFAULT 0 NOT NULL,
17
Varor_period int DEFAULT 0 NOT NULL
16
Period int(4) zerofill DEFAULT '0000' NOT NULL,
17
Varor_period int(4) DEFAULT '0' NOT NULL
20
20
INSERT INTO t1 VALUES (9410,9412);
32
fld1 int DEFAULT 0 NOT NULL,
33
companynr int DEFAULT 0 NOT NULL,
32
fld1 int(6) zerofill DEFAULT '000000' NOT NULL,
33
companynr int(2) zerofill DEFAULT '00' 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
46
45
INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat','');
47
46
INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W');
48
47
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
1242
1241
INSERT INTO t2 VALUES (1191,068504,00,'bonfire','corresponds','positively','');
1243
1242
INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky','');
1244
1243
INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly','');
1246
1244
--enable_query_log
1308
1306
CREATE TABLE t1 (
1309
Period int DEFAULT 0 NOT NULL,
1310
Varor_period int DEFAULT 0 NOT NULL
1307
Period int(4) zerofill DEFAULT '0000' NOT NULL,
1308
Varor_period int(4) DEFAULT '0' NOT NULL
1311
1309
) ENGINE = CSV;
1313
1311
INSERT INTO t1 VALUES (9410,9412);
1442
1440
CREATE TABLE test_repair_table4 (
1443
1441
num int not null,
1444
magic_no int DEFAULT 0 NOT NULL,
1442
magic_no int(4) zerofill DEFAULT '0000' NOT NULL,
1445
1443
company_name char(30) DEFAULT '' NOT NULL,
1446
1444
founded char(4) DEFAULT '' NOT NULL
1447
1445
) ENGINE = CSV;
1474
1472
CREATE TABLE test_repair_table5 (
1475
1473
num int not null,
1476
magic_no int DEFAULT 0 NOT NULL,
1474
magic_no int(4) zerofill DEFAULT '0000' NOT NULL,
1477
1475
company_name char(30) DEFAULT '' NOT NULL,
1478
1476
founded char(4) DEFAULT '' NOT NULL
1479
1477
) ENGINE = CSV;
1585
1583
# resulted in scanning through deleted memory and we were geting a crash.
1586
1584
# that's why we need two tables in the bugtest
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;
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
1714
1731
# Bug #31473: does not work with NULL value in datetime field
1716
1733
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;
1718
1738
insert into t1 values();
1719
1739
select * from t1;
1721
1741
create table t1(a varchar(32) not null) engine=csv;
1723
1742
insert into t1 values();
1724
1743
select * from t1;
1726
1745
create table t1(a int not null) engine=csv;
1728
1746
insert into t1 values();
1729
1747
select * from t1;
1731
1749
create table t1(a blob not null) engine=csv;
1733
1750
insert into t1 values();
1734
1751
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;
1736
1757
# We prevent creation of table with nullable ENUM
1737
1758
--error ER_CHECK_NOT_IMPLEMENTED
1738
1759
create table t1(a enum('foo','bar') default null) engine=csv;