mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge 10-base->10.0
This commit is contained in:
@ -216,7 +216,7 @@ reset master;
|
||||
create table t1 (id tinyint auto_increment primary key);
|
||||
insert into t1 values(5);
|
||||
set insert_id=128;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(null) /* Not binlogged */;
|
||||
|
||||
# The followin insert ignore will be put in binlog
|
||||
@ -238,7 +238,7 @@ drop table t1;
|
||||
|
||||
create table t1 (id tinyint auto_increment primary key) engine=myisam;
|
||||
set insert_id=128;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(5),(null) /* Insert_id 128 */;
|
||||
|
||||
# The followin insert ignore will be put in binlog
|
||||
|
12
mysql-test/include/ctype_str_to_date.inc
Normal file
12
mysql-test/include/ctype_str_to_date.inc
Normal file
@ -0,0 +1,12 @@
|
||||
--echo #
|
||||
--echo # MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
|
||||
--echo #
|
||||
|
||||
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
|
||||
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
|
||||
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
|
||||
SHOW COLUMNS FROM t1;
|
||||
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
|
||||
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
@ -336,6 +336,25 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
|
||||
#
|
||||
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
|
||||
@@character_set_connection HEX(CAST(_utf8'÷' AS CHAR))
|
||||
latin1 F7
|
||||
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
|
||||
STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
|
||||
2001-01-01
|
||||
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
|
||||
SHOW COLUMNS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
subject varchar(64) NO
|
||||
pattern varchar(64) NO
|
||||
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
|
||||
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
|
||||
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
|
||||
32303031F73031F73031 2559F7256DF72564 2001-01-01 00:00:00
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='latin1_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -138,6 +138,25 @@ a hex(b) c
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
|
||||
#
|
||||
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
|
||||
@@character_set_connection HEX(CAST(_utf8'÷' AS CHAR))
|
||||
sjis 8180
|
||||
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
|
||||
STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
|
||||
2001-01-01
|
||||
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
|
||||
SHOW COLUMNS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
subject varchar(64) NO
|
||||
pattern varchar(64) NO
|
||||
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
|
||||
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
|
||||
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
|
||||
323030318180303181803031 25598180256D81802564 2001-01-01 00:00:00
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='sjis_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -895,6 +895,25 @@ a hex(b) c
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
|
||||
#
|
||||
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
|
||||
@@character_set_connection HEX(CAST(_utf8'÷' AS CHAR))
|
||||
ucs2 00F7
|
||||
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
|
||||
STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
|
||||
2001-01-01
|
||||
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
|
||||
SHOW COLUMNS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
subject varchar(64) NO
|
||||
pattern varchar(64) NO
|
||||
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
|
||||
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
|
||||
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
|
||||
003200300030003100F70030003100F700300031 0025005900F70025006D00F700250064 2001-01-01 00:00:00
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
|
@ -1058,6 +1058,25 @@ s 0
|
||||
ß 1
|
||||
DROP TABLE t1;
|
||||
"END ctype_german.inc"
|
||||
#
|
||||
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
|
||||
#
|
||||
SELECT @@character_set_connection, HEX(CAST(_utf8'÷' AS CHAR));
|
||||
@@character_set_connection HEX(CAST(_utf8'÷' AS CHAR))
|
||||
utf8 C3B7
|
||||
SELECT STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR));
|
||||
STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
|
||||
2001-01-01
|
||||
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
|
||||
SHOW COLUMNS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
subject varchar(64) NO
|
||||
pattern varchar(64) NO
|
||||
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
|
||||
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
|
||||
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
|
||||
32303031C3B73031C3B73031 2559C3B7256DC3B72564 2001-01-01 00:00:00
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='utf8_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -42,3 +42,47 @@ select * from t1 where a in ('4828532208463511553');
|
||||
a
|
||||
4828532208463511553
|
||||
drop table t1;
|
||||
#End of 4.1 tests
|
||||
#
|
||||
# MDEV-5103: server crashed on singular Item_equal
|
||||
#
|
||||
CREATE TABLE `t1` (
|
||||
`tipo` enum('p','r') NOT NULL DEFAULT 'r',
|
||||
`arquivo_id` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`arquivo_md5` char(32) NOT NULL,
|
||||
`conteudo` longblob NOT NULL,
|
||||
`usuario` varchar(15) NOT NULL,
|
||||
`datahora_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`tipo_arquivo` varchar(255) NOT NULL,
|
||||
`nome_arquivo` varchar(255) NOT NULL,
|
||||
`tamanho_arquivo` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`tipo`,`arquivo_id`),
|
||||
UNIQUE KEY `tipo` (`tipo`,`arquivo_md5`)
|
||||
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1;
|
||||
INSERT INTO `t1` (`tipo`, `arquivo_id`, `arquivo_md5`, `conteudo`, `usuario`, `datahora_gmt`, `tipo_arquivo`, `nome_arquivo`, `tamanho_arquivo`) VALUES
|
||||
('r', 1, 'ad18832202b199728921807033a8a515', '', 'rspadim', '2013-10-05 13:55:50', '001_cbr643', 'CBR6431677410201314132.ret', 21306);
|
||||
CREATE TABLE `t2` (
|
||||
`tipo` enum('p','r') NOT NULL DEFAULT 'p',
|
||||
`arquivo_id` bigint(20) NOT NULL DEFAULT '0',
|
||||
`usuario` varchar(25) NOT NULL,
|
||||
`datahora` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`erros` longblob NOT NULL,
|
||||
`importados` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`n_importados` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`tipo`,`arquivo_id`,`datahora`)
|
||||
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1;
|
||||
INSERT INTO `t2` (`tipo`, `arquivo_id`, `usuario`, `datahora`, `erros`, `importados`, `n_importados`) VALUES
|
||||
('r', 1, 'rspadim', '2013-10-05 14:25:30', '', 32, 0);
|
||||
SELECT
|
||||
arquivo_id,usuario,datahora_gmt,tipo_arquivo,nome_arquivo,tamanho_arquivo
|
||||
FROM t1 AS a
|
||||
WHERE datahora_gmt>='0000-00-00 00:00:00' AND
|
||||
datahora_gmt<='2013-10-07 02:59:59' AND tipo='r' AND
|
||||
(tipo_arquivo,arquivo_id) NOT IN
|
||||
(SELECT tipo_arquivo,arquivo_id
|
||||
FROM t2
|
||||
WHERE (tipo_arquivo,arquivo_id)=(a.tipo_arquivo,a.arquivo_id))
|
||||
ORDER BY arquivo_id DESC;
|
||||
arquivo_id usuario datahora_gmt tipo_arquivo nome_arquivo tamanho_arquivo
|
||||
drop table t2, t1;
|
||||
#End of 5.3 tests
|
||||
|
@ -232,7 +232,7 @@ mysqltest: At line 2: Spurious text after `query` expression
|
||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
|
||||
mysqltest: At line 1: The error name definition must start with an uppercase E or W
|
||||
mysqltest: At line 1: The error name definition must start with an uppercase E or W or H
|
||||
mysqltest: At line 1: Invalid argument to error: '9eeeee' - the errno may only consist of digits[0-9]
|
||||
mysqltest: At line 1: Invalid argument to error: '1sssss' - the errno may only consist of digits[0-9]
|
||||
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
|
||||
|
@ -4919,6 +4919,37 @@ q 1 q
|
||||
q 1 q
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-5153: Server crashes in Item_ref::fix_fields on 2nd execution
|
||||
# of PS with LEFT JOIN and MERGE view or SELECT SQ
|
||||
#
|
||||
CREATE TABLE t1 (i1 INT, c1 VARCHAR(6)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
CREATE TABLE t2 (c2 VARCHAR(6)) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES ('foobar'),('qux');
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1 WHERE ( c1 ) IN ( SELECT c2 FROM t2 ) AND i1 <= 2 ;
|
||||
PREPARE stmt FROM 'SELECT * FROM t1 LEFT JOIN v1 ON (v1.i1 = t1.i1)';
|
||||
EXECUTE stmt;
|
||||
i1 c1 i1 c1
|
||||
1 foo NULL NULL
|
||||
2 bar NULL NULL
|
||||
EXECUTE stmt;
|
||||
i1 c1 i1 c1
|
||||
1 foo NULL NULL
|
||||
2 bar NULL NULL
|
||||
drop view v1;
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1 WHERE ( c1, c1 ) IN ( SELECT c2, c2 FROM t2 ) AND i1 <= 2 ;
|
||||
EXECUTE stmt;
|
||||
i1 c1 i1 c1
|
||||
1 foo NULL NULL
|
||||
2 bar NULL NULL
|
||||
EXECUTE stmt;
|
||||
i1 c1 i1 c1
|
||||
1 foo NULL NULL
|
||||
2 bar NULL NULL
|
||||
deallocate prepare stmt;
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.3 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
2
mysql-test/suite/mtr2/overlay.inc
Normal file
2
mysql-test/suite/mtr2/overlay.inc
Normal file
@ -0,0 +1,2 @@
|
||||
select 2;
|
||||
|
@ -1,3 +1,6 @@
|
||||
select 1;
|
||||
1
|
||||
1
|
||||
select 2;
|
||||
2
|
||||
2
|
||||
|
@ -5,4 +5,8 @@
|
||||
# three times - once for the parent suite, and once for each overlay.
|
||||
# even if the test files are not overlayed.
|
||||
#
|
||||
# overlay.inc is overridden in mtr2-myisam, and there is an rdiff file.
|
||||
#
|
||||
select 1;
|
||||
source overlay.inc;
|
||||
|
||||
|
11
mysql-test/suite/sys_vars/r/thread_pool_size_high.result
Normal file
11
mysql-test/suite/sys_vars/r/thread_pool_size_high.result
Normal file
@ -0,0 +1,11 @@
|
||||
SELECT @@global.thread_pool_size;
|
||||
@@global.thread_pool_size
|
||||
200
|
||||
SET @@global.thread_pool_size=150;
|
||||
SET @@global.thread_pool_size=200;
|
||||
SET @@global.thread_pool_size=201;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect thread_pool_size value: '201'
|
||||
SELECT @@global.thread_pool_size;
|
||||
@@global.thread_pool_size
|
||||
200
|
1
mysql-test/suite/sys_vars/t/thread_pool_size_basic.opt
Normal file
1
mysql-test/suite/sys_vars/t/thread_pool_size_basic.opt
Normal file
@ -0,0 +1 @@
|
||||
--loose-thread-handling=pool-of-threads
|
@ -1,6 +1,7 @@
|
||||
# uint global
|
||||
--source include/not_windows.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_pool_of_threads.inc
|
||||
SET @start_global_value = @@global.thread_pool_size;
|
||||
|
||||
#
|
||||
|
1
mysql-test/suite/sys_vars/t/thread_pool_size_high.opt
Normal file
1
mysql-test/suite/sys_vars/t/thread_pool_size_high.opt
Normal file
@ -0,0 +1 @@
|
||||
--loose-thread-handling=pool-of-threads --loose-thread-pool-size=200
|
14
mysql-test/suite/sys_vars/t/thread_pool_size_high.test
Normal file
14
mysql-test/suite/sys_vars/t/thread_pool_size_high.test
Normal file
@ -0,0 +1,14 @@
|
||||
--source include/not_windows.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_pool_of_threads.inc
|
||||
|
||||
SELECT @@global.thread_pool_size;
|
||||
|
||||
# Set lower value
|
||||
SET @@global.thread_pool_size=150;
|
||||
# Set original value
|
||||
SET @@global.thread_pool_size=200;
|
||||
# Try higher value
|
||||
SET @@global.thread_pool_size=201;
|
||||
|
||||
SELECT @@global.thread_pool_size;
|
@ -104,7 +104,7 @@ explain extended select last_insert_id();
|
||||
--error ER_DUP_ENTRY
|
||||
insert into t1 set i = 254;
|
||||
select last_insert_id();
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 set i = null;
|
||||
select last_insert_id();
|
||||
drop table t1;
|
||||
@ -113,7 +113,7 @@ create table t1 (i tinyint unsigned not null auto_increment, key (i));
|
||||
insert into t1 set i = 254;
|
||||
insert into t1 set i = null;
|
||||
select last_insert_id();
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 set i = null;
|
||||
select last_insert_id();
|
||||
drop table t1;
|
||||
@ -354,7 +354,7 @@ INSERT INTO t1 VALUES (18446744073709551601);
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=10;
|
||||
|
||||
SELECT @@SESSION.AUTO_INCREMENT_OFFSET;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
SELECT * FROM t1;
|
||||
|
||||
|
@ -13,25 +13,25 @@ let $range_max=32767;
|
||||
|
||||
eval create table t1 (a $type primary key auto_increment);
|
||||
eval insert into t1 values($range_max);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max-1);
|
||||
insert into t1 values(NULL);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max),(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max-1),(NULL),(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max+1);
|
||||
select * from t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values(NULL);
|
||||
drop table t1;
|
||||
|
||||
@ -44,25 +44,25 @@ let $range_max=65535;
|
||||
|
||||
eval create table t1 (a $type primary key auto_increment);
|
||||
eval insert into t1 values($range_max);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max-1);
|
||||
insert into t1 values(NULL);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max),(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max-1),(NULL),(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max+1);
|
||||
select * from t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values(NULL);
|
||||
drop table t1;
|
||||
|
||||
@ -75,25 +75,25 @@ let $range_max=2147483647;
|
||||
|
||||
eval create table t1 (a $type primary key auto_increment);
|
||||
eval insert into t1 values($range_max);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max-1);
|
||||
insert into t1 values(NULL);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max),(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max-1),(NULL),(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max+1);
|
||||
select * from t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values(NULL);
|
||||
drop table t1;
|
||||
|
||||
@ -106,25 +106,25 @@ let $range_max=4294967295;
|
||||
|
||||
eval create table t1 (a $type primary key auto_increment);
|
||||
eval insert into t1 values($range_max);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max-1);
|
||||
insert into t1 values(NULL);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max),(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max-1),(NULL),(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max+1);
|
||||
select * from t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values(NULL);
|
||||
drop table t1;
|
||||
|
||||
@ -137,25 +137,25 @@ let $range_max=cast(9223372036854775807 as unsigned);
|
||||
|
||||
eval create table t1 (a $type primary key auto_increment);
|
||||
eval insert into t1 values($range_max);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max-1);
|
||||
insert into t1 values(NULL);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max),(NULL);
|
||||
select * from t1;
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values($range_max-1),(NULL),(NULL);
|
||||
truncate table t1;
|
||||
eval insert into t1 values($range_max+1);
|
||||
select * from t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
eval insert into t1 values(NULL);
|
||||
drop table t1;
|
||||
|
||||
@ -200,7 +200,7 @@ set @org_mode=@@sql_mode;
|
||||
set @@sql_mode='ansi,traditional';
|
||||
insert ignore into t1 values(32766),(NULL),(NULL);
|
||||
truncate table t1;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(32766),(NULL),(NULL);
|
||||
set @@sql_mode=@org_mode;
|
||||
drop table t1;
|
||||
@ -223,7 +223,7 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a smallint AUTO_INCREMENT, PRIMARY KEY (a));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
INSERT INTO t1 VALUES (32768);
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
@ -235,6 +235,6 @@ DROP TABLE t1;
|
||||
create table t1 (a smallint primary key auto_increment);
|
||||
insert into t1 values(32766),(NULL);
|
||||
delete from t1 where a=32767;
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values(NULL);
|
||||
drop table t1;
|
||||
|
@ -82,6 +82,7 @@ select 'a' regexp 'A' collate latin1_bin;
|
||||
SET collation_connection='latin1_swedish_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_str_to_date.inc
|
||||
SET collation_connection='latin1_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
|
@ -69,6 +69,7 @@ SET collation_connection='sjis_japanese_ci';
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
-- source include/ctype_str_to_date.inc
|
||||
SET collation_connection='sjis_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
|
@ -379,6 +379,7 @@ SET collation_connection='ucs2_general_ci';
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_german.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
-- source include/ctype_str_to_date.inc
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
|
@ -714,6 +714,7 @@ SET collation_connection='utf8_general_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_german.inc
|
||||
-- source include/ctype_str_to_date.inc
|
||||
SET collation_connection='utf8_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
|
@ -43,4 +43,54 @@ select * from t1 where a = '4828532208463511553';
|
||||
select * from t1 where a in ('4828532208463511553');
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
--echo #End of 4.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5103: server crashed on singular Item_equal
|
||||
--echo #
|
||||
|
||||
CREATE TABLE `t1` (
|
||||
`tipo` enum('p','r') NOT NULL DEFAULT 'r',
|
||||
`arquivo_id` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`arquivo_md5` char(32) NOT NULL,
|
||||
`conteudo` longblob NOT NULL,
|
||||
`usuario` varchar(15) NOT NULL,
|
||||
`datahora_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`tipo_arquivo` varchar(255) NOT NULL,
|
||||
`nome_arquivo` varchar(255) NOT NULL,
|
||||
`tamanho_arquivo` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`tipo`,`arquivo_id`),
|
||||
UNIQUE KEY `tipo` (`tipo`,`arquivo_md5`)
|
||||
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1;
|
||||
|
||||
INSERT INTO `t1` (`tipo`, `arquivo_id`, `arquivo_md5`, `conteudo`, `usuario`, `datahora_gmt`, `tipo_arquivo`, `nome_arquivo`, `tamanho_arquivo`) VALUES
|
||||
('r', 1, 'ad18832202b199728921807033a8a515', '', 'rspadim', '2013-10-05 13:55:50', '001_cbr643', 'CBR6431677410201314132.ret', 21306);
|
||||
|
||||
|
||||
CREATE TABLE `t2` (
|
||||
`tipo` enum('p','r') NOT NULL DEFAULT 'p',
|
||||
`arquivo_id` bigint(20) NOT NULL DEFAULT '0',
|
||||
`usuario` varchar(25) NOT NULL,
|
||||
`datahora` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`erros` longblob NOT NULL,
|
||||
`importados` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`n_importados` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`tipo`,`arquivo_id`,`datahora`)
|
||||
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1;
|
||||
|
||||
INSERT INTO `t2` (`tipo`, `arquivo_id`, `usuario`, `datahora`, `erros`, `importados`, `n_importados`) VALUES
|
||||
('r', 1, 'rspadim', '2013-10-05 14:25:30', '', 32, 0);
|
||||
|
||||
SELECT
|
||||
arquivo_id,usuario,datahora_gmt,tipo_arquivo,nome_arquivo,tamanho_arquivo
|
||||
FROM t1 AS a
|
||||
WHERE datahora_gmt>='0000-00-00 00:00:00' AND
|
||||
datahora_gmt<='2013-10-07 02:59:59' AND tipo='r' AND
|
||||
(tipo_arquivo,arquivo_id) NOT IN
|
||||
(SELECT tipo_arquivo,arquivo_id
|
||||
FROM t2
|
||||
WHERE (tipo_arquivo,arquivo_id)=(a.tipo_arquivo,a.arquivo_id))
|
||||
ORDER BY arquivo_id DESC;
|
||||
|
||||
drop table t2, t1;
|
||||
--echo #End of 5.3 tests
|
||||
|
@ -25,9 +25,9 @@ drop table t1;
|
||||
|
||||
create table t1 (a tinyint not null auto_increment primary key, b char(20) default "default_value");
|
||||
insert into t1 values (126,"first"),(63, "middle"),(0,"last");
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
insert into t1 values (0,"error");
|
||||
--error 167
|
||||
--error HA_ERR_AUTOINC_ERANGE
|
||||
replace into t1 values (0,"error");
|
||||
replace into t1 values (126,"first updated");
|
||||
replace into t1 values (63,default);
|
||||
|
@ -4845,6 +4845,34 @@ SELECT * FROM t2 LEFT JOIN v1 ON ( c=b AND a IN ( 1,6 ) );
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5153: Server crashes in Item_ref::fix_fields on 2nd execution
|
||||
--echo # of PS with LEFT JOIN and MERGE view or SELECT SQ
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (i1 INT, c1 VARCHAR(6)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
|
||||
CREATE TABLE t2 (c2 VARCHAR(6)) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES ('foobar'),('qux');
|
||||
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1 WHERE ( c1 ) IN ( SELECT c2 FROM t2 ) AND i1 <= 2 ;
|
||||
|
||||
PREPARE stmt FROM 'SELECT * FROM t1 LEFT JOIN v1 ON (v1.i1 = t1.i1)';
|
||||
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
|
||||
drop view v1;
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1 WHERE ( c1, c1 ) IN ( SELECT c2, c2 FROM t2 ) AND i1 <= 2 ;
|
||||
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
|
||||
deallocate prepare stmt;
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
|
||||
--echo # -----------------------------------------------------------------
|
||||
--echo # -- End of 5.3 tests.
|
||||
--echo # -----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user