~cbjchen/ubuntu/trusty/mysql-5.6/fix-for-1500684

« back to all changes in this revision

Viewing changes to mysql-test/suite/parts/r/partition_special_innodb.result

  • Committer: liang.chen at canonical
  • Date: 2015-10-09 13:32:49 UTC
  • Revision ID: liang.chen@canonical.com-20151009133249-v5b8dc80a7jgjpig
Update to 5.6.26

Update to 5.6.26 to pick up security fixes.

local changes:
1. mysql-5.6.26-fix-build.patch is to fix a build dependency issue
2. change -fno-exception to -fexceptions in rules to allow catching
   exception

[cbjchen,r=]

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
#            ADD PARTITION and LOCK TABLE
222
222
CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
223
223
ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
 
224
INSERT INTO t1 VALUES (2, 2), (3, 3), (4, 4), (5, 5);
224
225
SET lock_wait_timeout = 2;
225
226
#Connection 1 locks the table
226
227
LOCK TABLE t1 READ;
231
232
# Second attempt: says that partition already exists
232
233
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
233
234
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
235
# Check that we only can select, not insert/update/delete.
 
236
INSERT INTO t1 VALUES (NULL, 6), (NULL, 7), (10, 10), (11, 11);
 
237
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
238
UPDATE t1 SET i = 5 WHERE f = 2;
 
239
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
240
DELETE FROM t1 WHERE i = 10;
 
241
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
242
SELECT * FROM t1;
 
243
i       f
 
244
2       2
 
245
3       3
 
246
4       4
 
247
5       5
234
248
# Connection 1 unlocks the table and locks it again:
235
249
UNLOCK TABLES;
236
250
LOCK TABLE t1 READ;
283
297
SELECT * FROM t3;
284
298
ERROR 42S02: Table 'test.t3' doesn't exist
285
299
DROP TABLE t4;
 
300
# Test WRITE LOCK.
 
301
CREATE TABLE t1 ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f INT )
 
302
ENGINE = InnoDB PARTITION BY HASH(i) PARTITIONS 2;
 
303
INSERT INTO t1 VALUES (3, 3), (4, 4);
 
304
SET lock_wait_timeout = 2;
 
305
#Connection 1 locks the table
 
306
LOCK TABLE t1 WRITE;
 
307
# Check that we still can SELECT, but not insert/update/delete.
 
308
# Check that we only can select, not insert/update/delete.
 
309
INSERT INTO t1 VALUES (NULL, 1), (NULL, 2), (10, 10), (11, 11);
 
310
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
311
UPDATE t1 SET i = 5 WHERE f = 2;
 
312
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
313
DELETE FROM t1 WHERE i = 10;
 
314
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
315
SELECT * FROM t1;
 
316
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 
317
UNLOCK TABLES;
 
318
DROP TABLE t1;