~ubuntu-branches/ubuntu/raring/mysql-5.5/raring-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/r/innodb-autoinc.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-01-16 08:29:25 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130116082925-znscu5xswxo6pmw2
Tags: 5.5.29-0ubuntu1
* SECURITY UPDATE: Update to 5.5.29 to fix security issues (LP: #1100264)
  - http://www.oracle.com/technetwork/topics/security/cpujan2013-1515902.html
* debian/patches/CVE-2012-5611.patch: removed, included upstream.
* debian/patches/38_scripts__mysqld_safe.sh__signals.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1269
1269
c1      c2
1270
1270
1       NULL
1271
1271
DROP TABLE t1;
 
1272
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
 
1273
SHOW VARIABLES LIKE "%auto_inc%";
 
1274
Variable_name   Value
 
1275
auto_increment_increment        1
 
1276
auto_increment_offset   1
 
1277
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
 
1278
INSERT INTO t1 VALUES (2147483648, 'a');
 
1279
SHOW CREATE TABLE t1;
 
1280
Table   Create Table
 
1281
t1      CREATE TABLE `t1` (
 
1282
  `c1` int(10) unsigned NOT NULL AUTO_INCREMENT,
 
1283
  `c2` varchar(10) DEFAULT NULL,
 
1284
  PRIMARY KEY (`c1`)
 
1285
) ENGINE=InnoDB AUTO_INCREMENT=2147483649 DEFAULT CHARSET=latin1
 
1286
SELECT * FROM t1;
 
1287
c1      c2
 
1288
2147483648      a
 
1289
ALTER TABLE t1 CHANGE c1 c1 INT;
 
1290
Warnings:
 
1291
Warning 1264    Out of range value for column 'c1' at row 1
 
1292
SHOW CREATE TABLE t1;
 
1293
Table   Create Table
 
1294
t1      CREATE TABLE `t1` (
 
1295
  `c1` int(11) NOT NULL DEFAULT '0',
 
1296
  `c2` varchar(10) DEFAULT NULL,
 
1297
  PRIMARY KEY (`c1`)
 
1298
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
1299
INSERT INTO t1(c2) VALUES('b');
 
1300
SELECT * FROM t1;
 
1301
c1      c2
 
1302
0       b
 
1303
2147483647      a
 
1304
SHOW CREATE TABLE t1;
 
1305
Table   Create Table
 
1306
t1      CREATE TABLE `t1` (
 
1307
  `c1` int(11) NOT NULL DEFAULT '0',
 
1308
  `c2` varchar(10) DEFAULT NULL,
 
1309
  PRIMARY KEY (`c1`)
 
1310
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
1311
DROP TABLE t1;
 
1312
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY, c2 INT) ENGINE = MyISAM;
 
1313
INSERT INTO t1 (c1) VALUES (NULL), (-290783232), (NULL);
 
1314
Warnings:
 
1315
Warning 1264    Out of range value for column 'c1' at row 3
 
1316
SHOW CREATE TABLE t1;
 
1317
Table   Create Table
 
1318
t1      CREATE TABLE `t1` (
 
1319
  `c1` int(11) NOT NULL AUTO_INCREMENT,
 
1320
  `c2` int(11) DEFAULT NULL,
 
1321
  PRIMARY KEY (`c1`)
 
1322
) ENGINE=MyISAM AUTO_INCREMENT=2147483648 DEFAULT CHARSET=latin1
 
1323
SELECT * FROM t1;
 
1324
c1      c2
 
1325
1       NULL
 
1326
-290783232      NULL
 
1327
2147483647      NULL
 
1328
ALTER TABLE t1 ENGINE = InnoDB;
 
1329
SELECT * FROM t1;
 
1330
c1      c2
 
1331
-290783232      NULL
 
1332
1       NULL
 
1333
2147483647      NULL
 
1334
SHOW CREATE TABLE t1;
 
1335
Table   Create Table
 
1336
t1      CREATE TABLE `t1` (
 
1337
  `c1` int(11) NOT NULL AUTO_INCREMENT,
 
1338
  `c2` int(11) DEFAULT NULL,
 
1339
  PRIMARY KEY (`c1`)
 
1340
) ENGINE=InnoDB AUTO_INCREMENT=2147483648 DEFAULT CHARSET=latin1
 
1341
REPLACE INTO t1 (c2 ) VALUES (0);
 
1342
ERROR HY000: Failed to read auto-increment value from storage engine
 
1343
SELECT * FROM t1;
 
1344
c1      c2
 
1345
-290783232      NULL
 
1346
1       NULL
 
1347
2147483647      NULL
 
1348
DROP TABLE t1;
 
1349
CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
 
1350
AUTO_INCREMENT=10000000000000000000;
 
1351
SHOW CREATE TABLE t1;
 
1352
Table   Create Table
 
1353
t1      CREATE TABLE `t1` (
 
1354
  `c1` double NOT NULL AUTO_INCREMENT,
 
1355
  PRIMARY KEY (`c1`)
 
1356
) ENGINE=InnoDB AUTO_INCREMENT=10000000000000000000 DEFAULT CHARSET=latin1
 
1357
INSERT INTO t1 VALUES ();
 
1358
ERROR HY000: Failed to read auto-increment value from storage engine
 
1359
DROP TABLE t1;