1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-16534 PPC64: Unexpected error with a negative value into auto-increment columns in HEAP, MyISAM, ARIA

This commit is contained in:
Alexander Barkov
2018-06-20 16:36:46 +04:00
parent 15b92915ed
commit 170b43c156
9 changed files with 165 additions and 3 deletions

View File

@ -39,3 +39,32 @@ _rowid _rowid skey sval
1 1 1 hello
2 2 2 hey
drop table t1;
#
# Start of 5.5 tests
#
#
# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
#
CREATE TABLE t1 (
id TINYINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` tinyint(4) NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
INSERT INTO t1 (name) VALUES ('dog');
UPDATE t1 SET id=-1 WHERE id=1;
INSERT INTO t1 (name) VALUES ('cat');
SELECT * FROM t1;
id name
-1 dog
2 cat
DROP TABLE t1;
#
# End of 5.5 tests
#

View File

@ -33,3 +33,28 @@ select _rowid,t1._rowid,skey,sval from t1;
drop table t1;
# End of 4.1 tests
--echo #
--echo # Start of 5.5 tests
--echo #
--echo #
--echo # MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
--echo #
CREATE TABLE t1 (
id TINYINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY;
SHOW CREATE TABLE t1;
INSERT INTO t1 (name) VALUES ('dog');
UPDATE t1 SET id=-1 WHERE id=1;
INSERT INTO t1 (name) VALUES ('cat');
SELECT * FROM t1;
DROP TABLE t1;
--echo #
--echo # End of 5.5 tests
--echo #