mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge 10.2 into 10.3
This commit is contained in:
commit
b32bc70e34
27 changed files with 245 additions and 71 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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -831,6 +831,18 @@ select JSON_VALID( '{"a":1]' );
|
|||
JSON_VALID( '{"a":1]' )
|
||||
0
|
||||
#
|
||||
# MDEV-18886 JSON_ARRAY() does not recognise JSON argument.
|
||||
#
|
||||
SELECT JSON_ARRAY(_UTF8 'str', JSON_OBJECT(_LATIN1 'plugin', _LATIN1'unix_socket'));
|
||||
JSON_ARRAY(_UTF8 'str', JSON_OBJECT(_LATIN1 'plugin', _LATIN1'unix_socket'))
|
||||
["str", {"plugin": "unix_socket"}]
|
||||
SELECT CHARSET(JSON_ARRAY());
|
||||
CHARSET(JSON_ARRAY())
|
||||
latin1
|
||||
SELECT CHARSET(JSON_OBJECT());
|
||||
CHARSET(JSON_OBJECT())
|
||||
latin1
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
|
|
|
|||
|
|
@ -484,6 +484,13 @@ SET sql_mode=default;
|
|||
|
||||
select JSON_VALID( '{"a":1]' );
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18886 JSON_ARRAY() does not recognise JSON argument.
|
||||
--echo #
|
||||
SELECT JSON_ARRAY(_UTF8 'str', JSON_OBJECT(_LATIN1 'plugin', _LATIN1'unix_socket'));
|
||||
SELECT CHARSET(JSON_ARRAY());
|
||||
SELECT CHARSET(JSON_OBJECT());
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
|
|
|||
|
|
@ -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 *//*!*/;
|
||||
|
|
@ -962,7 +962,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 *//*!*/;
|
||||
|
|
@ -1045,7 +1045,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 *//*!*/;
|
||||
|
|
@ -1128,7 +1128,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 *//*!*/;
|
||||
|
|
@ -1211,7 +1211,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 *//*!*/;
|
||||
|
|
|
|||
|
|
@ -190,3 +190,56 @@ NULL NULL
|
|||
DROP TABLE t;
|
||||
# Cleanup
|
||||
DROP DATABASE temp_db;
|
||||
USE test;
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=MyISAM;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select * from t1;
|
||||
f b
|
||||
NULL 1
|
||||
NULL 2
|
||||
drop table t1;
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=1;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select * from t1;
|
||||
f b
|
||||
NULL 1
|
||||
NULL 2
|
||||
drop table t1;
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=0 row_format=page;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select * from t1;
|
||||
f b
|
||||
NULL 1
|
||||
NULL 2
|
||||
drop table t1;
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=0 row_format=dynamic;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select * from t1;
|
||||
f b
|
||||
NULL 1
|
||||
NULL 2
|
||||
drop table t1;
|
||||
|
|
|
|||
|
|
@ -182,3 +182,43 @@ DROP TABLE t;
|
|||
|
||||
--echo # Cleanup
|
||||
DROP DATABASE temp_db;
|
||||
USE test;
|
||||
|
||||
#
|
||||
# MDEV-17070 Table corruption or Assertion `table->file->stats.records > 0 || error' or Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon actions on temporary table
|
||||
#
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=MyISAM;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
check table t1;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=1;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
check table t1;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=0 row_format=page;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
check table t1;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=0 row_format=dynamic;
|
||||
replace into t1 values (null,1),(null,2);
|
||||
alter table t1 add fulltext key(f);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 change if exists a b int, algorithm=inplace;
|
||||
check table t1;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue