-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't use normal diffs in *.rdiff files
they aren't robust enough and can easily apply incorrectly (this fixes the failure of innodb.insert_into_empty,4k after the merge)
- Loading branch information
Showing
6 changed files
with
308 additions
and
192 deletions.
There are no files selected for viewing
121 changes: 79 additions & 42 deletions
121
mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,79 @@ | ||
7,8c7,8 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
21,22c21,22 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
35,36c35,36 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
49,50c49,50 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
63,64c63,64 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
77,78c77,78 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
98,99c98,99 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
--- alter_not_null.result | ||
+++ alter_not_null,COPY,NON-STRICT.result~ | ||
@@ -4,8 +4,8 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
@@ -18,8 +18,8 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
@@ -32,8 +32,8 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
@@ -46,8 +46,8 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc'; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
@@ -60,8 +60,8 @@ | ||
f1 f2 f3 | ||
2 2 NULL | ||
ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2); | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'f3' at row 1 | ||
SELECT * FROM t1; | ||
@@ -74,8 +74,8 @@ | ||
f1 b | ||
10 NULL | ||
ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0); | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'b' at row 1 | ||
SELECT * FROM t1; | ||
@@ -95,8 +95,8 @@ | ||
CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(1, NULL); | ||
ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'c2' at row 1 | ||
SELECT * FROM t1; |
181 changes: 109 additions & 72 deletions
181
mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,109 @@ | ||
7,10c7 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
< Warnings: | ||
< Warning 1265 Data truncated for column 'f1' at row 1 | ||
--- | ||
> ERROR 01000: Data truncated for column 'f1' at row 1 | ||
13c10 | ||
< 0 | ||
--- | ||
> NULL | ||
21,24c18 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
< Warnings: | ||
< Warning 1265 Data truncated for column 'f1' at row 1 | ||
--- | ||
> ERROR 01000: Data truncated for column 'f1' at row 1 | ||
27c21 | ||
< | ||
--- | ||
> NULL | ||
35,38c29 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
< Warnings: | ||
< Warning 1265 Data truncated for column 'f1' at row 1 | ||
--- | ||
> ERROR 01000: Data truncated for column 'f1' at row 1 | ||
41c32 | ||
< | ||
--- | ||
> NULL | ||
49,52c40 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
< Warnings: | ||
< Warning 1265 Data truncated for column 'f1' at row 1 | ||
--- | ||
> ERROR 01000: Data truncated for column 'f1' at row 1 | ||
55c43 | ||
< | ||
--- | ||
> NULL | ||
63,66c51 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
< Warnings: | ||
< Warning 1265 Data truncated for column 'f3' at row 1 | ||
--- | ||
> ERROR 01000: Data truncated for column 'f3' at row 1 | ||
69c54 | ||
< 2 2 0 | ||
--- | ||
> 2 2 NULL | ||
77,80c62 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
< Warnings: | ||
< Warning 1265 Data truncated for column 'b' at row 1 | ||
--- | ||
> ERROR 01000: Data truncated for column 'b' at row 1 | ||
83c65 | ||
< 10 0 | ||
--- | ||
> 10 NULL | ||
98,99c80,81 | ||
< affected rows: 0 | ||
< info: Records: 0 Duplicates: 0 Warnings: 1 | ||
--- | ||
> affected rows: 1 | ||
> info: Records: 1 Duplicates: 0 Warnings: 1 | ||
--- alter_not_null.result | ||
+++ alter_not_null,COPY,STRICT.result~ | ||
@@ -4,13 +4,10 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
-Warnings: | ||
-Warning 1265 Data truncated for column 'f1' at row 1 | ||
+ERROR 01000: Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
f1 | ||
-0 | ||
+NULL | ||
DROP TABLE t1; | ||
CREATE TABLE t1(f1 CHAR(10))ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(NULL); | ||
@@ -18,13 +15,10 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
-Warnings: | ||
-Warning 1265 Data truncated for column 'f1' at row 1 | ||
+ERROR 01000: Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
f1 | ||
- | ||
+NULL | ||
DROP TABLE t1; | ||
CREATE TABLE t1(f1 VARCHAR(10))ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(NULL); | ||
@@ -32,13 +26,10 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
-Warnings: | ||
-Warning 1265 Data truncated for column 'f1' at row 1 | ||
+ERROR 01000: Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
f1 | ||
- | ||
+NULL | ||
DROP TABLE t1; | ||
CREATE TABLE t1(f1 TEXT)ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(NULL); | ||
@@ -46,13 +37,10 @@ | ||
f1 | ||
NULL | ||
ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc'; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
-Warnings: | ||
-Warning 1265 Data truncated for column 'f1' at row 1 | ||
+ERROR 01000: Data truncated for column 'f1' at row 1 | ||
SELECT * FROM t1; | ||
f1 | ||
- | ||
+NULL | ||
DROP TABLE t1; | ||
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT)ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(2, 2, NULL); | ||
@@ -60,13 +48,10 @@ | ||
f1 f2 f3 | ||
2 2 NULL | ||
ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2); | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
-Warnings: | ||
-Warning 1265 Data truncated for column 'f3' at row 1 | ||
+ERROR 01000: Data truncated for column 'f3' at row 1 | ||
SELECT * FROM t1; | ||
f1 f2 f3 | ||
-2 2 0 | ||
+2 2 NULL | ||
DROP TABLE t1; | ||
CREATE TABLE t1(f1 INT NOT NULL DEFAULT 0, b TINYINT)ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES(10, NULL); | ||
@@ -74,13 +59,10 @@ | ||
f1 b | ||
10 NULL | ||
ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0); | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
-Warnings: | ||
-Warning 1265 Data truncated for column 'b' at row 1 | ||
+ERROR 01000: Data truncated for column 'b' at row 1 | ||
SELECT * FROM t1; | ||
f1 b | ||
-10 0 | ||
+10 NULL | ||
DROP TABLE t1; | ||
CREATE TABLE t1(a INT, v INT AS (a), c INT, d INT NOT NULL, e INT) ENGINE=InnoDB; | ||
ALTER TABLE t1 DROP COLUMN c, CHANGE COLUMN e e INT NOT NULL; | ||
@@ -95,8 +77,8 @@ | ||
CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(1, NULL); | ||
ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2; | ||
-affected rows: 0 | ||
-info: Records: 0 Duplicates: 0 Warnings: 1 | ||
+affected rows: 1 | ||
+info: Records: 1 Duplicates: 0 Warnings: 1 | ||
Warnings: | ||
Warning 1265 Data truncated for column 'c2' at row 1 | ||
SELECT * FROM t1; |
Oops, something went wrong.