Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.1.20, 10.2.3
Description
MariaDB [test]> SET sql_mode = '';
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [test]> CREATE TABLE t1(a INT);
|
Query OK, 0 rows affected (0.05 sec)
|
|
MariaDB [test]> INSERT INTO t1 VALUES(2147483647);
|
Query OK, 1 row affected (0.00 sec)
|
|
MariaDB [test]> ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=SHARED;
|
Query OK, 1 row affected, 1 warning (0.16 sec)
|
Records: 1 Duplicates: 0 Warnings: 1
|
|
MariaDB [test]> SHOW WARNINGS;
|
+---------+------+--------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+--------------------------------------------+
|
| Warning | 1264 | Out of range value for column 'b' at row 1 |
|
+---------+------+--------------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [test]> ALTER TABLE t1 ADD COLUMN c SMALLINT AS (a) VIRTUAL;
|
Query OK, 0 rows affected (0.10 sec)
|
Records: 0 Duplicates: 0 Warnings: 0 <-- No warning
|
|
MariaDB [test]> SELECT * FROM t1;
|
+------------+-------+-------+
|
| a | b | c |
|
+------------+-------+-------+
|
| 2147483647 | 32767 | 32767 |
|
+------------+-------+-------+
|
1 row in set (0.00 sec)
|
Note: This only happens with InnoDB.
Attachments
Issue Links
- relates to
-
MDEV-7635 update defaults and simplify mysqld config parameters
- Closed