mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge
This commit is contained in:
26
mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result
Normal file
26
mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result
Normal file
@ -0,0 +1,26 @@
|
||||
drop table if exists t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
DELETE FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
2
|
||||
DROP TABLE t1;
|
@ -1,5 +1,8 @@
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop database if exists mysqltest;
|
||||
CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
|
||||
INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
|
||||
UPDATE bug58912 SET a=REPEAT('a',7999);
|
||||
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
|
||||
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
|
||||
select id, code, name from t1 order by id;
|
||||
@ -1676,10 +1679,10 @@ variable_value - @innodb_rows_deleted_orig
|
||||
71
|
||||
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
|
||||
variable_value - @innodb_rows_inserted_orig
|
||||
1066
|
||||
1067
|
||||
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
|
||||
variable_value - @innodb_rows_updated_orig
|
||||
865
|
||||
866
|
||||
SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
|
||||
variable_value - @innodb_row_lock_waits_orig
|
||||
0
|
||||
@ -3239,3 +3242,4 @@ Variable_name Value
|
||||
Handler_update 1
|
||||
Variable_name Value
|
||||
Handler_delete 1
|
||||
DROP TABLE bug58912;
|
||||
|
29
mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test
Normal file
29
mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test
Normal file
@ -0,0 +1,29 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
# embedded server ignores 'delayed', so skip this
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug #18274 InnoDB auto_increment field reset on OPTIMIZE TABLE
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
SHOW CREATE TABLE t1;
|
||||
DELETE FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval set global innodb_file_format_check=$innodb_file_format_check_orig;
|
@ -43,6 +43,15 @@ drop table if exists t1,t2,t3,t4;
|
||||
drop database if exists mysqltest;
|
||||
--enable_warnings
|
||||
|
||||
# Bug#58912 InnoDB unnecessarily avoids update-in-place on column prefixes
|
||||
CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
|
||||
INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
|
||||
UPDATE bug58912 SET a=REPEAT('a',7999);
|
||||
# The above statements used to trigger a failure during purge when
|
||||
# Bug#55284 was fixed while Bug#58912 was not. Defer the DROP TABLE,
|
||||
# so that purge gets a chance to run (and a double free of the
|
||||
# off-page column can be detected, if one is to occur.)
|
||||
|
||||
#
|
||||
# Small basic test with ignore
|
||||
#
|
||||
@ -2541,6 +2550,9 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
|
||||
|
||||
-- enable_query_log
|
||||
|
||||
# Clean up after the Bug#55284/Bug#58912 test case.
|
||||
DROP TABLE bug58912;
|
||||
|
||||
#######################################################################
|
||||
# #
|
||||
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
||||
|
@ -12,6 +12,7 @@ create table C(id int not null auto_increment primary key, f1 int not null, fore
|
||||
insert into A values(1), (2);
|
||||
|
||||
--disable_query_log
|
||||
begin;
|
||||
let $i=257;
|
||||
while ($i)
|
||||
{
|
||||
@ -24,6 +25,7 @@ while ($i)
|
||||
insert into C(f1) values(2);
|
||||
dec $i;
|
||||
}
|
||||
commit;
|
||||
--enable_query_log
|
||||
|
||||
# Following Deletes should not report error
|
||||
|
Reference in New Issue
Block a user