We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
mysql> select @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec) mysql> create table t( pk int primary key not null auto_increment, data binary(12) not null); Query OK, 0 rows affected (0.06 sec) mysql> insert into t(data) values (null); Query OK, 1 row affected, 1 warning (0.00 sec) mysql> select * from t; +----+----------------------------+ | pk | data | +----+----------------------------+ | 1 | 0x000000000000000000000000 | +----+----------------------------+ 1 row in set (0.00 sec)
Tidb should not allow insert of NULL value to NOT NULL column. See below mysql result:
mysql> select @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec) mysql> create table t( pk int primary key not null auto_increment, data binary(12) not null); Query OK, 0 rows affected (0.01 sec) mysql> insert into t(data) values (null); ERROR 1048 (23000): Column 'data' cannot be null mysql> select @@version; +-----------+ | @@version | +-----------+ | 8.0.40 | +-----------+ 1 row in set (0.00 sec)
tidb allows insert of NULL value to NOT NULL column, it's incompatible with mysql
mysql> select @@version; +--------------------+ | @@version | +--------------------+ | 8.0.11-TiDB-v7.5.3 | +--------------------+ 1 row in set (0.00 sec)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Tidb should not allow insert of NULL value to NOT NULL column. See below mysql result:
3. What did you see instead (Required)
tidb allows insert of NULL value to NOT NULL column, it's incompatible with mysql
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: