~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/innodb.test

  • Committer: Stewart Smith
  • Date: 2010-08-05 16:41:55 UTC
  • mfrom: (1638.9.13)
  • mto: (1720.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1721.
  • Revision ID: stewart@flamingspork.com-20100805164155-7olu6iv6rwoxfsne
Merged store-foreign-key-in-table-proto into show-create-table-using-table-message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
834
834
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
835
835
insert t2 select * from t1;
836
836
insert t3 select * from t1;
837
 
checksum table t1, t2, t3, t4;
838
 
checksum table t1, t2, t3, t4;
839
 
checksum table t1, t2, t3, t4;
840
837
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
841
838
drop table t1,t2,t3;
842
839
 
1152
1149
drop table t1;
1153
1150
 
1154
1151
#
1155
 
# Test that update does not change internal auto-increment value
1156
 
#
1157
 
 
1158
 
create table t1 (a int not null auto_increment primary key, val int) engine=InnoDB;
1159
 
insert into t1 (val) values (1);
1160
 
update t1 set a=2 where a=1;
1161
 
# We should get the following error because InnoDB does not update the counter
1162
 
--error ER_DUP_ENTRY
1163
 
insert into t1 (val) values (1);
1164
 
select * from t1;
1165
 
drop table t1;
1166
 
#
1167
1152
# Bug #10465
1168
1153
#
1169
1154
 
1267
1252
create table t1 (col1 varchar(768) primary key)
1268
1253
 engine = innodb;
1269
1254
--error 1071
1270
 
create table t2 (col1 varbinary(768) primary key)
 
1255
create table t2 (col1 varbinary(1024) primary key)
1271
1256
 engine = innodb;
1272
1257
--error 1071
1273
1258
create table t3 (col1 text, primary key(col1(768)))
1274
1259
 engine = innodb;
1275
1260
--error 1071
1276
 
create table t4 (col1 blob, primary key(col1(768)))
 
1261
create table t4 (col1 blob, primary key(col1(1024)))
1277
1262
 engine = innodb;
1278
1263
 
1279
1264
#
1311
1296
INSERT INTO t2 VALUES(3);
1312
1297
 
1313
1298
DROP TABLE t2;
1314
 
#
1315
 
# Test that checksum table uses a consistent read Bug #12669
1316
 
#
1317
 
connect (a,localhost,root,,);
1318
 
connect (b,localhost,root,,);
1319
 
connection a;
1320
 
create table t1(a int not null) engine=innodb;
1321
 
insert into t1 values (1),(2);
1322
 
set autocommit=0;
1323
 
checksum table t1;
1324
 
connection b;
1325
 
insert into t1 values(3);
1326
 
connection a;
1327
 
#
1328
 
# Here checksum should not see insert
1329
 
#
1330
 
checksum table t1;
1331
 
connection a;
1332
 
commit;
1333
 
checksum table t1;
1334
 
commit;
1335
 
drop table t1;
1336
 
#
1337
 
# autocommit = 1
1338
 
#
1339
 
connection a;
1340
 
create table t1(a int not null) engine=innodb;
1341
 
insert into t1 values (1),(2);
1342
 
set autocommit=1;
1343
 
checksum table t1;
1344
 
connection b;
1345
 
set autocommit=1;
1346
 
insert into t1 values(3);
1347
 
connection a;
1348
 
#
1349
 
# Here checksum sees insert
1350
 
#
1351
 
checksum table t1;
1352
 
drop table t1;
1353
 
 
1354
 
connection default;
1355
 
disconnect a;
1356
 
disconnect b;
1357
1299
 
1358
1300
# tests for bugs #9802 and #13778
1359
1301
 
1420
1362
                 b varchar(255),
1421
1363
                 c varchar(255),
1422
1364
                 d varchar(255),
1423
 
                 key (a,b,c,d)) engine=innodb;
 
1365
                 key (a(200),b(200),c(200),d(200))) engine=innodb;
1424
1366
drop table t1;
1425
1367
--error ER_TOO_LONG_KEY
1426
1368
create table t1 (a varchar(255),