diff options
author | unknown <sanja@montyprogram.com> | 2013-08-20 16:23:30 +0300 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2013-08-20 16:23:30 +0300 |
commit | 9a28e43305bf62e1cef269c395f3ac212c659347 (patch) | |
tree | 14c02951bdfa7adf2630762e3432ee9e94acc1f4 /mysql-test | |
parent | 0903a40d09a98bb482d2d53530d60eb539753443 (diff) | |
download | mariadb-git-9a28e43305bf62e1cef269c395f3ac212c659347.tar.gz |
new format length calculation check added.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/dyncol.result | 12 | ||||
-rw-r--r-- | mysql-test/t/dyncol.test | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result index 7316a1c2d17..8b14884fec0 100644 --- a/mysql-test/r/dyncol.result +++ b/mysql-test/r/dyncol.result @@ -1413,6 +1413,13 @@ Warnings: Warning 1265 Data truncated for column 'dyn' at row 1 SELECT COLUMN_ADD( dyn, 6, REPEAT('x',80), 4, REPEAT('y',215) AS INTEGER ) FROM t1; ERROR HY000: Encountered illegal format of dynamic column string +delete from t1; +#above test with 10.0 format +INSERT INTO t1 SET dyn = COLUMN_CREATE( 'a', REPEAT('a', 250), 'b', REPEAT('b', 322) ); +Warnings: +Warning 1265 Data truncated for column 'dyn' at row 1 +SELECT COLUMN_ADD( dyn, 'c', REPEAT('x',80), 'b', REPEAT('y',215) AS INTEGER ) FROM t1; +ERROR HY000: Encountered illegal format of dynamic column string DROP table t1; # # MDEV-4812: Valgrind warnings (Invalid write) in @@ -1423,6 +1430,11 @@ INSERT INTO t1 SET dyncol = COLUMN_CREATE( 7, REPEAT('k',487), 209, REPEAT('x',4 Warnings: Warning 1265 Data truncated for column 'dyncol' at row 1 SELECT COLUMN_ADD( dyncol, 7, '22:22:22', 8, REPEAT('x',270) AS CHAR ) FROM t1; +delete from t1; +INSERT INTO t1 SET dyncol = COLUMN_CREATE( 'a', REPEAT('k',487), 'b', REPEAT('x',464) ); +Warnings: +Warning 1265 Data truncated for column 'dyncol' at row 1 +SELECT COLUMN_ADD( dyncol, 'a', '22:22:22', 'c', REPEAT('x',270) AS CHAR ) FROM t1; DROP table t1; # # end of 5.3 tests diff --git a/mysql-test/t/dyncol.test b/mysql-test/t/dyncol.test index 12bb2f0690a..476798a6c7f 100644 --- a/mysql-test/t/dyncol.test +++ b/mysql-test/t/dyncol.test @@ -612,6 +612,12 @@ CREATE TABLE t1 (dyn TINYBLOB) ENGINE=MyISAM; INSERT INTO t1 SET dyn = COLUMN_CREATE( 40, REPEAT('a', 233), 4, REPEAT('b', 322) ); --error ER_DYN_COL_WRONG_FORMAT SELECT COLUMN_ADD( dyn, 6, REPEAT('x',80), 4, REPEAT('y',215) AS INTEGER ) FROM t1; +delete from t1; +--echo #above test with 10.0 format +INSERT INTO t1 SET dyn = COLUMN_CREATE( 'a', REPEAT('a', 250), 'b', REPEAT('b', 322) ); +--error ER_DYN_COL_WRONG_FORMAT +SELECT COLUMN_ADD( dyn, 'c', REPEAT('x',80), 'b', REPEAT('y',215) AS INTEGER ) FROM t1; + DROP table t1; @@ -624,6 +630,11 @@ CREATE TABLE t1 (dyncol TINYBLOB) ENGINE=MyISAM; INSERT INTO t1 SET dyncol = COLUMN_CREATE( 7, REPEAT('k',487), 209, REPEAT('x',464) ); --error 0,ER_DYN_COL_WRONG_FORMAT SELECT COLUMN_ADD( dyncol, 7, '22:22:22', 8, REPEAT('x',270) AS CHAR ) FROM t1; +delete from t1; +INSERT INTO t1 SET dyncol = COLUMN_CREATE( 'a', REPEAT('k',487), 'b', REPEAT('x',464) ); +--error 0,ER_DYN_COL_WRONG_FORMAT +SELECT COLUMN_ADD( dyncol, 'a', '22:22:22', 'c', REPEAT('x',270) AS CHAR ) FROM t1; + DROP table t1; --echo # |