mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-21278 Assertion is_unsigned() == attr.unsigned_flag' or Assertion
field.is_sane()' failed
The type handler and unsigned_flag erroneously went out of sync in Item_func_minus::fix_length_and_dec.
This commit is contained in:
@@ -2726,3 +2726,41 @@ DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-21278 Assertion `is_unsigned() == attr.unsigned_flag' or Assertion `field.is_sane()' failed
|
||||
#
|
||||
CREATE TABLE t1 (a TIMESTAMP);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
SET SESSION SQL_MODE= 'NO_UNSIGNED_SUBTRACTION';
|
||||
SELECT DISTINCT UUID_SHORT() - a FROM t1;
|
||||
UUID_SHORT() - a
|
||||
xxx
|
||||
xxx
|
||||
CREATE TABLE t2 AS SELECT DISTINCT UUID_SHORT() - a FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`UUID_SHORT() - a` bigint(22) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2, t1;
|
||||
SET sql_mode=DEFAULT;
|
||||
CREATE TABLE t1 (a TIMESTAMP);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
SET SESSION SQL_MODE= 'NO_UNSIGNED_SUBTRACTION';
|
||||
SELECT UUID_SHORT() - a FROM t1;
|
||||
UUID_SHORT() - a
|
||||
xxx
|
||||
xxx
|
||||
CREATE TABLE t2 AS SELECT UUID_SHORT() - a FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`UUID_SHORT() - a` bigint(22) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2, t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user