mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
branches/zip: Merge revisions 5233:5341 from branches/5.1:
------------------------------------------------------------------------ r5233 | marko | 2009-06-03 15:12:44 +0300 (Wed, 03 Jun 2009) | 11 lines branches/5.1: Merge the test case from r5232 from branches/5.0: ------------------------------------------------------------------------ r5232 | marko | 2009-06-03 14:31:04 +0300 (Wed, 03 Jun 2009) | 21 lines branches/5.0: Merge r3590 from branches/5.1 in order to fix Bug #40565 (Update Query Results in "1 Row Affected" But Should Be "Zero Rows"). Also, add a test case for Bug #40565. rb://128 approved by Heikki Tuuri ------------------------------------------------------------------------ ------------------------------------------------------------------------ r5243 | sunny | 2009-06-04 03:17:14 +0300 (Thu, 04 Jun 2009) | 14 lines branches/5.1: When the InnoDB and MySQL data dictionaries go out of sync, before the bug fix we would assert on missing autoinc columns. With this fix we allow MySQL to open the table but set the next autoinc value for the column to the MAX value. This effectively disables the next value generation. INSERTs will fail with a generic AUTOINC failure. However, the user should be able to read/dump the table, set the column values explicitly, use ALTER TABLE to set the next autoinc value and/or sync the two data dictionaries to resume normal operations. Fix Bug#44030 Error: (1500) Couldn't read the MAX(ID) autoinc value from the index (PRIMARY) rb://118 ------------------------------------------------------------------------ r5252 | sunny | 2009-06-04 10:16:24 +0300 (Thu, 04 Jun 2009) | 2 lines branches/5.1: The version of the result file checked in was broken in r5243. ------------------------------------------------------------------------ r5259 | vasil | 2009-06-05 10:29:16 +0300 (Fri, 05 Jun 2009) | 7 lines branches/5.1: Remove the word "Error" from the printout because the mysqltest suite interprets it as an error and thus the innodb-autoinc test fails. Approved by: Sunny (via IM) ------------------------------------------------------------------------ r5339 | marko | 2009-06-17 11:01:37 +0300 (Wed, 17 Jun 2009) | 2 lines branches/5.1: Add missing #include "mtr0log.h" so that the code compiles with -DUNIV_MUST_NOT_INLINE. (null merge; this had already been committed in branches/zip) ------------------------------------------------------------------------ r5340 | marko | 2009-06-17 12:11:49 +0300 (Wed, 17 Jun 2009) | 4 lines branches/5.1: row_unlock_for_mysql(): When the clustered index is unknown, refuse to unlock the record. (Bug #45357, caused by the fix of Bug #39320). rb://132 approved by Sunny Bains. ------------------------------------------------------------------------
This commit is contained in:
@ -867,3 +867,25 @@ INSERT INTO t2 SELECT NULL FROM t1;
|
||||
Got one of the listed errors
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
INSERT INTO t1 VALUES (null);
|
||||
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
3
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
3
|
||||
INSERT INTO t1 VALUES(null);
|
||||
Got one of the listed errors
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 3;
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
3
|
||||
4
|
||||
DROP TABLE t1;
|
||||
|
@ -478,3 +478,23 @@ INSERT INTO t2 SELECT c1 FROM t1;
|
||||
INSERT INTO t2 SELECT NULL FROM t1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from
|
||||
# the index (PRIMARY)
|
||||
# This test requires a restart of the server
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
INSERT INTO t1 VALUES (null);
|
||||
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
|
||||
SELECT * FROM t1;
|
||||
# Restart the server
|
||||
-- source include/restart_mysqld.inc
|
||||
# The MySQL and InnoDB data dictionaries should now be out of sync.
|
||||
# The select should print message to the error log
|
||||
SELECT * FROM t1;
|
||||
-- error ER_AUTOINC_READ_FAILED,1467
|
||||
INSERT INTO t1 VALUES(null);
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 3;
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
7
mysql-test/innodb_bug45357.result
Normal file
7
mysql-test/innodb_bug45357.result
Normal file
@ -0,0 +1,7 @@
|
||||
set session transaction isolation level read committed;
|
||||
create table bug45357(a int, b int,key(b))engine=innodb;
|
||||
insert into bug45357 values (25170,6122);
|
||||
update bug45357 set a=1 where b=30131;
|
||||
delete from bug45357 where b < 20996;
|
||||
delete from bug45357 where b < 7001;
|
||||
drop table bug45357;
|
10
mysql-test/innodb_bug45357.test
Normal file
10
mysql-test/innodb_bug45357.test
Normal file
@ -0,0 +1,10 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
set session transaction isolation level read committed;
|
||||
|
||||
create table bug45357(a int, b int,key(b))engine=innodb;
|
||||
insert into bug45357 values (25170,6122);
|
||||
update bug45357 set a=1 where b=30131;
|
||||
delete from bug45357 where b < 20996;
|
||||
delete from bug45357 where b < 7001;
|
||||
drop table bug45357;
|
Reference in New Issue
Block a user