MariaDB [test]> CREATE TABLE t1 (a int unsigned AS ( CAST(0 AS UNSIGNED) -1) STORED);
|
ERROR 1901 (HY000): Function or expression 'cast(0 as unsigned) - 1' cannot be used in the GENERATED ALWAYS AS clause of `a`
|
MariaDB [test]> set sql_mode=no_unsigned_subtraction;
|
Query OK, 0 rows affected (0.000 sec)
|
MariaDB [test]> CREATE TABLE t1 (a int unsigned AS ( CAST(0 AS UNSIGNED) -1) STORED);
|
Query OK, 0 rows affected (0.014 sec)
|
there are other sql modes that affect other functions and expressions. may be they're also affected, I didn't check that