diff options
author | Timothy Smith <timothy.smith@sun.com> | 2009-03-11 18:15:46 -0600 |
---|---|---|
committer | Timothy Smith <timothy.smith@sun.com> | 2009-03-11 18:15:46 -0600 |
commit | a33a51e2a8cd07b684020753453ecb29fa668733 (patch) | |
tree | a3104376c93e0496b341f0cf92d7d1532232b2cc /mysql-test/r/innodb-autoinc.result | |
parent | 50851796a5cd4f38268f9e986ef728e9651c0bd1 (diff) | |
download | mariadb-git-a33a51e2a8cd07b684020753453ecb29fa668733.tar.gz |
Applying InnoDB snashot 5.1-ss4350, part 2. Fixes
Bug #42400 InnoDB autoinc code can't handle floating-point columns
Detailed revision comments:
r4065 | sunny | 2009-01-29 16:01:36 +0200 (Thu, 29 Jan 2009) | 8 lines
branches/5.1: In the last round of AUTOINC cleanup we assumed that AUTOINC
is only defined for integer columns. This caused an assertion failure when
we checked for the maximum value of a column type. We now calculate the
max value for floating-point autoinc columns too.
Fix Bug#42400 - InnoDB autoinc code can't handle floating-point columns
rb://84 and Mantis issue://162
r4111 | sunny | 2009-02-03 22:06:52 +0200 (Tue, 03 Feb 2009) | 2 lines
branches/5.1: Add the ULL suffix otherwise there is an overflow.
Diffstat (limited to 'mysql-test/r/innodb-autoinc.result')
-rw-r--r-- | mysql-test/r/innodb-autoinc.result | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index 1e4b088c6cd..c49405f5175 100644 --- a/mysql-test/r/innodb-autoinc.result +++ b/mysql-test/r/innodb-autoinc.result @@ -579,3 +579,51 @@ c1 18446744073709551610 18446744073709551615 DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SET @@INSERT_ID=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +CREATE TABLE t1 (c1 DOUBLE NOT NULL AUTO_INCREMENT, c2 INT, PRIMARY KEY (c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(NULL, 1); +INSERT INTO t1 VALUES(NULL, 2); +SELECT * FROM t1; +c1 c2 +1 1 +2 2 +ALTER TABLE t1 CHANGE c1 c1 SERIAL; +SELECT * FROM t1; +c1 c2 +1 1 +2 2 +INSERT INTO t1 VALUES(NULL, 3); +INSERT INTO t1 VALUES(NULL, 4); +SELECT * FROM t1; +c1 c2 +1 1 +2 2 +3 3 +4 4 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 FLOAT NOT NULL AUTO_INCREMENT, c2 INT, PRIMARY KEY (c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(NULL, 1); +INSERT INTO t1 VALUES(NULL, 2); +SELECT * FROM t1; +c1 c2 +1 1 +2 2 +ALTER TABLE t1 CHANGE c1 c1 SERIAL; +SELECT * FROM t1; +c1 c2 +1 1 +2 2 +INSERT INTO t1 VALUES(NULL, 3); +INSERT INTO t1 VALUES(NULL, 4); +SELECT * FROM t1; +c1 c2 +1 1 +2 2 +3 3 +4 4 +DROP TABLE t1; |