~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/innodb.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
2381
2381
DROP TABLE t2;
2382
2382
DISCONNECT c1;
2383
2383
DISCONNECT c2;
 
2384
CONNECTION default;
 
2385
 
 
2386
#
 
2387
# Bug #29157 UPDATE, changed rows incorrect
 
2388
#
 
2389
create table t1 (i int, j int) engine=innodb;
 
2390
insert into t1 (i, j) values (1, 1), (2, 2);
 
2391
--enable_info
 
2392
update t1 set j = 2;
 
2393
--disable_info
 
2394
drop table t1;
 
2395
 
 
2396
#
 
2397
# Bug #32440 InnoDB free space info does not appear in SHOW TABLE STATUS or
 
2398
# I_S
 
2399
#
 
2400
create table t1 (id int) comment='this is a comment' engine=innodb;
 
2401
select table_comment, data_free > 0 as data_free_is_set
 
2402
  from information_schema.tables
 
2403
  where table_schema='test' and table_name = 't1';
 
2404
drop table t1;
 
2405
 
 
2406
#
 
2407
# Bug 34920 test
 
2408
#
 
2409
CONNECTION default;
 
2410
CREATE TABLE t1 (
 
2411
        c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 
2412
        c2 VARCHAR(128) NOT NULL,
 
2413
        PRIMARY KEY(c1)
 
2414
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100;
 
2415
 
 
2416
CREATE TABLE t2 (
 
2417
        c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 
2418
        c2 INT(10) UNSIGNED DEFAULT NULL,
 
2419
        PRIMARY KEY(c1)
 
2420
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200;
 
2421
 
 
2422
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
 
2423
ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1);
 
2424
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
 
2425
DROP TABLE t2;
 
2426
DROP TABLE t1;
 
2427
# End 34920 test
 
2428
#
 
2429
# Bug #29507 TRUNCATE shows to many rows effected
 
2430
#
 
2431
CONNECTION default;
 
2432
CREATE TABLE t1 (c1 int default NULL,
 
2433
                 c2 int default NULL
 
2434
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
2435
 
 
2436
--enable_info
 
2437
TRUNCATE TABLE t1;
 
2438
 
 
2439
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
 
2440
TRUNCATE TABLE t1;
 
2441
 
 
2442
--disable_info
 
2443
DROP TABLE t1;
 
2444
#
 
2445
# Bug#35537 Innodb doesn't increment handler_update and handler_delete.
 
2446
#
 
2447
-- disable_query_log
 
2448
-- disable_result_log
 
2449
 
 
2450
CONNECT (c1,localhost,root,,);
 
2451
 
 
2452
DROP TABLE IF EXISTS bug35537;
 
2453
CREATE TABLE bug35537 (
 
2454
  c1 int
 
2455
) ENGINE=InnoDB;
 
2456
 
 
2457
INSERT INTO bug35537 VALUES (1);
 
2458
 
 
2459
-- enable_result_log
 
2460
 
 
2461
SHOW SESSION STATUS LIKE 'Handler_update%';
 
2462
SHOW SESSION STATUS LIKE 'Handler_delete%';
 
2463
 
 
2464
UPDATE bug35537 SET c1 = 2 WHERE c1 = 1;
 
2465
DELETE FROM bug35537 WHERE c1 = 2;
 
2466
 
 
2467
SHOW SESSION STATUS LIKE 'Handler_update%';
 
2468
SHOW SESSION STATUS LIKE 'Handler_delete%';
 
2469
 
 
2470
DROP TABLE bug35537;
 
2471
 
 
2472
DISCONNECT c1;
 
2473
CONNECTION default;
2384
2474
 
2385
2475
#######################################################################
2386
2476
#                                                                     #