~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/archive_aio_posix.test

  • Committer: Monty Taylor
  • Date: 2009-08-29 19:30:29 UTC
  • mto: (1126.5.1 captain-20090914-03)
  • mto: This revision was merged to the branch mainline in revision 1129.
  • Revision ID: mordred@inaugust.com-20090829193029-i12fw4pg91dm8nu9
Fixed a buffer overrun that was causing some translated message output to suck.

Honestly guys, declaring a char[80] and then doing an sprintf into it with
no length checking? sigh

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Simple test for archive example
3
3
# Taken FROM the select test
4
4
#
 
5
-- source include/have_archive.inc
 
6
 
5
7
--disable_warnings
6
8
DROP TABLE if exists t1,t2,t3,t4,t5,t6;
7
9
--enable_warnings
1317
1319
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
1318
1320
INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
1319
1321
SELECT * FROM t2;
1320
 
ALTER TABLE t2 ENGINE=ARCHIVE;
 
1322
OPTIMIZE TABLE t2;
1321
1323
SELECT * FROM t2;
1322
1324
INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W');
1323
1325
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
1324
1326
INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
1325
 
ALTER TABLE t2 ENGINE=ARCHIVE;
 
1327
OPTIMIZE TABLE t2;
1326
1328
SELECT * FROM t2;
1327
1329
 
1328
1330
#
1333
1335
#
1334
1336
# For bug #12836
1335
1337
# Delete was allowing all rows to be removed
1336
 
--error ER_ILLEGAL_HA
 
1338
--error 1031
1337
1339
DELETE FROM t2;
1338
1340
SELECT * FROM t2;
1339
1341
INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W');
1340
1342
INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring','');
1341
1343
INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
1342
1344
SELECT * FROM t2;
1343
 
--error ER_ILLEGAL_HA
 
1345
--error 1031
1344
1346
TRUNCATE TABLE t2;
1345
1347
SELECT * FROM t2;
1346
1348
 
1370
1372
INSERT INTO t5 VALUES (NULL, "foo");
1371
1373
INSERT INTO t5 VALUES (NULL, "foo");
1372
1374
INSERT INTO t5 VALUES (32, "foo");
1373
 
--error ER_DUP_KEY
 
1375
--error 1022
1374
1376
INSERT INTO t5 VALUES (23, "foo");
1375
1377
INSERT INTO t5 VALUES (NULL, "foo");
1376
1378
INSERT INTO t5 VALUES (NULL, "foo");
1377
 
--error ER_DUP_KEY
 
1379
--error 1022
1378
1380
INSERT INTO t5 VALUES (3, "foo");
1379
1381
INSERT INTO t5 VALUES (NULL, "foo");
1380
1382
SELECT * FROM t5;
1401
1403
INSERT INTO t5 VALUES (3, "foo");
1402
1404
INSERT INTO t5 VALUES (NULL, "foo");
1403
1405
SELECT * FROM t5;
1404
 
ALTER TABLE t5 ENGINE=ARCHIVE;
 
1406
OPTIMIZE TABLE t5;
1405
1407
SELECT * FROM t5;
1406
1408
 
1407
1409
SELECT * FROM t5 WHERE a=32;
1538
1540
create table t1(a longblob) engine=archive;
1539
1541
insert into t1 set a='';
1540
1542
insert into t1 set a='a';
1541
 
check table t1;
 
1543
check table t1 extended;
1542
1544
drop table t1;
1543
1545
 
1544
1546
SET GLOBAL archive_aio=OFF;