~vkolesnikov/pbxt/pbxt-deadlock-detector

« back to all changes in this revision

Viewing changes to test/mysql-test/t/pbxt_bugs.test

  • Committer: Paul McCullagh
  • Date: 2009-03-12 09:19:33 UTC
  • mfrom: (576.1.4 pbxt)
  • Revision ID: paul.mccullagh@primebase.org-20090312091933-01buahcay46hiue6
Merged RN226

Show diffs side-by-side

added added

removed removed

Lines of Context:
807
807
insert into t2 values ("1");
808
808
 
809
809
DROP TABLE IF EXISTS t2,t1;
 
810
 
 
811
# bug 340316: Issue with bigint unsigned auto-increment field
 
812
 
 
813
--disable_warnings
 
814
DROP TABLE IF EXISTS t5;
 
815
--enable_warnings
 
816
CREATE TABLE t5 (
 
817
        c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, 
 
818
        c2 BIGINT SIGNED NULL, 
 
819
        c3 BIGINT SIGNED NOT NULL, 
 
820
        c4 TINYINT, c5 SMALLINT, 
 
821
        c6 MEDIUMINT, 
 
822
        c7 INT, 
 
823
        c8 INTEGER, 
 
824
        PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
 
825
 
 
826
INSERT INTO t5 VALUES
 
827
        (0,-9223372036854775808,1,2,3,4,5,5),
 
828
        (255,-2147483648,6,7,8,9,10,10),
 
829
        (65535,-8388608,11,12,13,14,15,15),
 
830
        (16777215,-32768,16,17,18,19,20,20),
 
831
        (4294967295,-128,21,22,23,24,25,25),
 
832
        (18446744073709551615,9223372036854775807,26,27,28,29,30,30);
 
833
 
 
834
--error 1467
 
835
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
 
836
--error 1467
 
837
INSERT INTO t5(c2,c3) VALUES(33,34);
 
838
 
 
839
SELECT * FROM t5;
 
840
 
 
841
DROP TABLE t5;
 
842
 
 
843
/* same test as above with signed bigint */
 
844
CREATE TABLE t5 (
 
845
        c1 BIGINT SIGNED NOT NULL AUTO_INCREMENT, 
 
846
        c2 BIGINT SIGNED NULL, 
 
847
        c3 BIGINT SIGNED NOT NULL, 
 
848
        c4 TINYINT, c5 SMALLINT, 
 
849
        c6 MEDIUMINT, 
 
850
        c7 INT, 
 
851
        c8 INTEGER, 
 
852
        PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
 
853
 
 
854
INSERT INTO t5 VALUES
 
855
        (0,-9223372036854775808,1,2,3,4,5,5),
 
856
        (255,-2147483648,6,7,8,9,10,10),
 
857
        (65535,-8388608,11,12,13,14,15,15),
 
858
        (16777215,-32768,16,17,18,19,20,20),
 
859
        (4294967295,-128,21,22,23,24,25,25),
 
860
        (9223372036854775807,9223372036854775807,26,27,28,29,30,30);
 
861
 
 
862
--error 1467
 
863
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
 
864
--error 1467
 
865
INSERT INTO t5(c2,c3) VALUES(33,34);
 
866
 
 
867
SELECT * FROM t5;