mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
fix the typo OPTION_NO_CHECK_CONSTRAINT_CHECKS
This commit is contained in:
parent
acb4a87204
commit
7025a51a7b
5 changed files with 37 additions and 10 deletions
|
@ -222,3 +222,16 @@ ERROR 23000: CONSTRAINT `t.b` failed for `test`.`t`
|
|||
insert into t values (1,1);
|
||||
ERROR 23000: CONSTRAINT `b` failed for `test`.`t`
|
||||
drop table t;
|
||||
create table t1 (a int auto_increment primary key, b int, check (b > 5));
|
||||
insert t1 (b) values (1);
|
||||
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
|
||||
insert t1 (b) values (10);
|
||||
select * from t1 where a is null;
|
||||
a b
|
||||
set sql_auto_is_null=1;
|
||||
select * from t1 where a is null;
|
||||
a b
|
||||
1 10
|
||||
insert t1 (b) values (1);
|
||||
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
|
||||
drop table t1;
|
||||
|
|
|
@ -724,7 +724,7 @@ ROLLBACK/*!*/;
|
|||
use `test`/*!*/;
|
||||
SET TIMESTAMP=1253783037/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
@ -778,7 +778,7 @@ DELIMITER /*!*/;
|
|||
ROLLBACK/*!*/;
|
||||
SET TIMESTAMP=1253783037/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
@ -813,7 +813,7 @@ ROLLBACK /* added by mysqlbinlog */;
|
|||
DELIMITER /*!*/;
|
||||
SET TIMESTAMP=1266652094/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
@ -855,7 +855,7 @@ ROLLBACK /* added by mysqlbinlog */;
|
|||
DELIMITER /*!*/;
|
||||
SET TIMESTAMP=1266652094/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
@ -964,7 +964,7 @@ AAAAAAAAAAAAAAAAAAAgrgJSFzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
|
|||
# Event: Query thread_id=1 exec_time=0 error_code=0
|
||||
SET TIMESTAMP=1375907364/*!*/;
|
||||
SET @@session.pseudo_thread_id=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
@ -1047,7 +1047,7 @@ AAAAAAAAAAAAAAAAAAA/rQJSGzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
|
|||
# Event: Query thread_id=1 exec_time=1 error_code=0
|
||||
SET TIMESTAMP=1375907141/*!*/;
|
||||
SET @@session.pseudo_thread_id=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
@ -1130,7 +1130,7 @@ AAAAAAAAAAAAAAAAAAAnrAJSHzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
|
|||
# Event: Query thread_id=1 exec_time=0 error_code=0
|
||||
SET TIMESTAMP=1375906879/*!*/;
|
||||
SET @@session.pseudo_thread_id=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
@ -1213,7 +1213,7 @@ AAAAAAAAAAAAAAAAAABbsAJSEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
|
|||
# Event: Query thread_id=1 exec_time=0 error_code=0
|
||||
SET TIMESTAMP=1375907933/*!*/;
|
||||
SET @@session.pseudo_thread_id=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
|
|
@ -57,7 +57,7 @@ DELIMITER /*!*/;
|
|||
# at 102
|
||||
<#>use `test`/*!*/;
|
||||
SET TIMESTAMP=1196959712/*!*/;
|
||||
<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/;
|
||||
<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
|
|
@ -162,3 +162,17 @@ insert into t values (-1, 0);
|
|||
insert into t values (1,1);
|
||||
|
||||
drop table t;
|
||||
|
||||
#
|
||||
# check constraints and auto_is_null typo
|
||||
#
|
||||
create table t1 (a int auto_increment primary key, b int, check (b > 5));
|
||||
--error ER_CONSTRAINT_FAILED
|
||||
insert t1 (b) values (1);
|
||||
insert t1 (b) values (10);
|
||||
select * from t1 where a is null;
|
||||
set sql_auto_is_null=1;
|
||||
select * from t1 where a is null;
|
||||
--error ER_CONSTRAINT_FAILED
|
||||
insert t1 (b) values (1);
|
||||
drop table t1;
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
#define TMP_TABLE_ALL_COLUMNS (1ULL << 12) // SELECT, intern
|
||||
#define OPTION_WARNINGS (1ULL << 13) // THD, user
|
||||
#define OPTION_AUTO_IS_NULL (1ULL << 14) // THD, user, binlog
|
||||
#define OPTION_NO_CHECK_CONSTRAINT_CHECKS (1ULL << 14)
|
||||
#define OPTION_NO_CHECK_CONSTRAINT_CHECKS (1ULL << 15)
|
||||
#define OPTION_SAFE_UPDATES (1ULL << 16) // THD, user
|
||||
#define OPTION_BUFFER_RESULT (1ULL << 17) // SELECT, user
|
||||
#define OPTION_BIN_LOG (1ULL << 18) // THD, user
|
||||
|
|
Loading…
Reference in a new issue