mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.0 into 10.1
This commit is contained in:
@ -1 +1,3 @@
|
|||||||
|
set global max_allowed_packet=1024*1024*10;
|
||||||
ERROR HY000: The definition for table `t1` is too big
|
ERROR HY000: The definition for table `t1` is too big
|
||||||
|
set global max_allowed_packet=default;
|
||||||
|
@ -55,3 +55,27 @@ pk f1 f2 f3 pk f1 f2 f3 f4 f5
|
|||||||
2 6 v NULL 14 1 q NULL 4 q
|
2 6 v NULL 14 1 q NULL 4 q
|
||||||
3 7 c NULL 14 1 q NULL 4 q
|
3 7 c NULL 14 1 q NULL 4 q
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
#
|
||||||
|
# MDEV-14440: Server crash in in handler::ha_external_lock or Assertion `inited==RND'
|
||||||
|
# failed in handler::ha_rnd_end upon SELECT from partitioned table
|
||||||
|
#
|
||||||
|
set @optimizer_switch_save= @@optimizer_switch;
|
||||||
|
set optimizer_switch='index_merge_sort_intersection=off';
|
||||||
|
create table t0 (a int)engine=innodb;
|
||||||
|
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||||
|
create table t1 (
|
||||||
|
a int, b int, c int,
|
||||||
|
key(a),key(b),key(c)
|
||||||
|
)engine=innodb;
|
||||||
|
insert into t1
|
||||||
|
select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a
|
||||||
|
from t0 A, t0 B, t0 C, t0 D where D.a<5;
|
||||||
|
set @@global.debug_dbug="+d,ha_index_init_fail";
|
||||||
|
explain select * from t1 where a=10 and b=10;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 1 Using intersect(a,b); Using where
|
||||||
|
select * from t1 where a=10 and b=10;
|
||||||
|
ERROR HY000: Table definition has changed, please retry transaction
|
||||||
|
DROP TABLE t0,t1;
|
||||||
|
set @@global.debug_dbug="-d";
|
||||||
|
set @@optimizer_switch= @optimizer_switch_save;
|
||||||
|
9
mysql-test/suite/innodb/r/innodb_28867993.result
Normal file
9
mysql-test/suite/innodb/r/innodb_28867993.result
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
insert t1 values (1),(2);
|
||||||
|
create database ib_logfile2;
|
||||||
|
select * from t1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
drop table t1;
|
||||||
|
drop database ib_logfile2;
|
12
mysql-test/suite/innodb/t/innodb_28867993.test
Normal file
12
mysql-test/suite/innodb/t/innodb_28867993.test
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Bug#28867993: POSSIBLE ISSUE WITH MYSQL SERVER RESTART
|
||||||
|
#
|
||||||
|
|
||||||
|
source include/have_innodb.inc;
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
insert t1 values (1),(2);
|
||||||
|
create database ib_logfile2;
|
||||||
|
source include/restart_mysqld.inc;
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
drop database ib_logfile2;
|
@ -4,17 +4,24 @@
|
|||||||
# verify that huge frms are rejected during creation, not on opening
|
# verify that huge frms are rejected during creation, not on opening
|
||||||
#
|
#
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
|
set global max_allowed_packet=1024*1024*10;
|
||||||
|
connect con1,localhost,root;
|
||||||
|
|
||||||
let $n=5646;
|
let $n=8164;
|
||||||
let $a=create table t1 (a int) engine=myisam partition by hash(a) partitions $n (;
|
let $a=create table t1 (a int) engine=myisam partition by hash(a) partitions $n (;
|
||||||
dec $n;
|
dec $n;
|
||||||
while ($n)
|
while ($n)
|
||||||
{
|
{
|
||||||
let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n,;
|
let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n COMMENT 'partition p01234567890123456789012345678901234567890123456789012345678$n',;
|
||||||
dec $n;
|
dec $n;
|
||||||
}
|
}
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--error ER_TABLE_DEFINITION_TOO_BIG
|
--error ER_TABLE_DEFINITION_TOO_BIG
|
||||||
eval $a partition foo);
|
eval $a partition foo);
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
disconnect con1;
|
||||||
|
set global max_allowed_packet=default;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t0, t1, t2;
|
drop table if exists t0, t1, t2;
|
||||||
@ -62,3 +63,27 @@ INSERT INTO t2 VALUES (4,'q'),(NULL,'j');
|
|||||||
SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2
|
SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2
|
||||||
WHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 );
|
WHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 );
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-14440: Server crash in in handler::ha_external_lock or Assertion `inited==RND'
|
||||||
|
--echo # failed in handler::ha_rnd_end upon SELECT from partitioned table
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
set @optimizer_switch_save= @@optimizer_switch;
|
||||||
|
set optimizer_switch='index_merge_sort_intersection=off';
|
||||||
|
create table t0 (a int)engine=innodb;
|
||||||
|
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||||
|
create table t1 (
|
||||||
|
a int, b int, c int,
|
||||||
|
key(a),key(b),key(c)
|
||||||
|
)engine=innodb;
|
||||||
|
insert into t1
|
||||||
|
select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a
|
||||||
|
from t0 A, t0 B, t0 C, t0 D where D.a<5;
|
||||||
|
set @@global.debug_dbug="+d,ha_index_init_fail";
|
||||||
|
explain select * from t1 where a=10 and b=10;
|
||||||
|
--error ER_TABLE_DEF_CHANGED
|
||||||
|
select * from t1 where a=10 and b=10;
|
||||||
|
DROP TABLE t0,t1;
|
||||||
|
set @@global.debug_dbug="-d";
|
||||||
|
set @@optimizer_switch= @optimizer_switch_save;
|
||||||
|
@ -1569,6 +1569,7 @@ failure:
|
|||||||
head->column_bitmaps_set(save_read_set, save_write_set);
|
head->column_bitmaps_set(save_read_set, save_write_set);
|
||||||
delete file;
|
delete file;
|
||||||
file= save_file;
|
file= save_file;
|
||||||
|
free_file= false;
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6557,6 +6558,8 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
|
|||||||
if (ror_intersect_add(intersect, cpk_scan, TRUE) &&
|
if (ror_intersect_add(intersect, cpk_scan, TRUE) &&
|
||||||
(intersect->total_cost < min_cost))
|
(intersect->total_cost < min_cost))
|
||||||
intersect_best= intersect; //just set pointer here
|
intersect_best= intersect; //just set pointer here
|
||||||
|
else
|
||||||
|
cpk_scan= 0; // Don't use cpk_scan
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cpk_scan= 0; // Don't use cpk_scan
|
cpk_scan= 0; // Don't use cpk_scan
|
||||||
|
@ -203,7 +203,7 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table,
|
|||||||
|
|
||||||
#define FRM_HEADER_SIZE 64
|
#define FRM_HEADER_SIZE 64
|
||||||
#define FRM_FORMINFO_SIZE 288
|
#define FRM_FORMINFO_SIZE 288
|
||||||
#define FRM_MAX_SIZE (512*1024)
|
#define FRM_MAX_SIZE (1024*1024)
|
||||||
|
|
||||||
static inline bool is_binary_frm_header(uchar *head)
|
static inline bool is_binary_frm_header(uchar *head)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2014, 2018, MariaDB Corporation.
|
Copyright (c) 2014, 2019, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -838,10 +838,9 @@ fil_try_to_close_file_in_LRU(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Flush any writes cached by the file system.
|
/** Flush any writes cached by the file system.
|
||||||
@param[in,out] space tablespace */
|
@param[in,out] space tablespace
|
||||||
static
|
@param[in] metadata whether to update file system metadata */
|
||||||
void
|
static void fil_flush_low(fil_space_t* space, bool metadata = false)
|
||||||
fil_flush_low(fil_space_t* space)
|
|
||||||
{
|
{
|
||||||
ut_ad(mutex_own(&fil_system->mutex));
|
ut_ad(mutex_own(&fil_system->mutex));
|
||||||
ut_ad(space);
|
ut_ad(space);
|
||||||
@ -865,7 +864,7 @@ fil_flush_low(fil_space_t* space)
|
|||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
#endif /* UNIV_DEBUG */
|
||||||
|
|
||||||
return;
|
if (!metadata) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prevent dropping of the space while we are flushing */
|
/* Prevent dropping of the space while we are flushing */
|
||||||
@ -1030,12 +1029,12 @@ fil_space_extend_must_retry(
|
|||||||
*success = os_file_set_size(node->name, node->handle, new_size,
|
*success = os_file_set_size(node->name, node->handle, new_size,
|
||||||
FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags));
|
FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags));
|
||||||
|
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
|
DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
|
||||||
*success = FALSE;
|
*success = FALSE;
|
||||||
os_has_said_disk_full = TRUE;);
|
os_has_said_disk_full = TRUE;);
|
||||||
|
|
||||||
if (*success) {
|
if (*success) {
|
||||||
|
os_file_flush(node->handle);
|
||||||
os_has_said_disk_full = FALSE;
|
os_has_said_disk_full = FALSE;
|
||||||
start_page_no = size;
|
start_page_no = size;
|
||||||
}
|
}
|
||||||
@ -1063,7 +1062,7 @@ fil_space_extend_must_retry(
|
|||||||
= (node->size / pages_per_mb) * pages_per_mb;
|
= (node->size / pages_per_mb) * pages_per_mb;
|
||||||
}
|
}
|
||||||
|
|
||||||
fil_flush_low(space);
|
fil_flush_low(space, true);
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2312,6 +2312,10 @@ innobase_start_or_create_for_mysql()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stat_info.type != OS_FILE_TYPE_FILE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!srv_file_check_mode(logfilename)) {
|
if (!srv_file_check_mode(logfilename)) {
|
||||||
return(DB_ERROR);
|
return(DB_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2014, 2018, MariaDB Corporation.
|
Copyright (c) 2014, 2019, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -846,10 +846,9 @@ fil_try_to_close_file_in_LRU(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Flush any writes cached by the file system.
|
/** Flush any writes cached by the file system.
|
||||||
@param[in,out] space tablespace */
|
@param[in,out] space tablespace
|
||||||
static
|
@param[in] metadata whether to update file system metadata */
|
||||||
void
|
static void fil_flush_low(fil_space_t* space, bool metadata = false)
|
||||||
fil_flush_low(fil_space_t* space)
|
|
||||||
{
|
{
|
||||||
ut_ad(mutex_own(&fil_system->mutex));
|
ut_ad(mutex_own(&fil_system->mutex));
|
||||||
ut_ad(space);
|
ut_ad(space);
|
||||||
@ -873,7 +872,7 @@ fil_flush_low(fil_space_t* space)
|
|||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
#endif /* UNIV_DEBUG */
|
||||||
|
|
||||||
return;
|
if (!metadata) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prevent dropping of the space while we are flushing */
|
/* Prevent dropping of the space while we are flushing */
|
||||||
@ -1037,15 +1036,16 @@ fil_space_extend_must_retry(
|
|||||||
*success = os_file_set_size(node->name, node->handle, new_size,
|
*success = os_file_set_size(node->name, node->handle, new_size,
|
||||||
FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags));
|
FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags));
|
||||||
|
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
|
DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
|
||||||
*success = FALSE;
|
*success = FALSE;
|
||||||
os_has_said_disk_full = TRUE;);
|
os_has_said_disk_full = TRUE;);
|
||||||
|
|
||||||
if (*success) {
|
if (*success) {
|
||||||
|
os_file_flush(node->handle);
|
||||||
os_has_said_disk_full = FALSE;
|
os_has_said_disk_full = FALSE;
|
||||||
start_page_no = size;
|
start_page_no = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_enter(&fil_system->mutex);
|
mutex_enter(&fil_system->mutex);
|
||||||
|
|
||||||
ut_a(node->being_extended);
|
ut_a(node->being_extended);
|
||||||
@ -1069,7 +1069,7 @@ fil_space_extend_must_retry(
|
|||||||
= (node->size / pages_per_mb) * pages_per_mb;
|
= (node->size / pages_per_mb) * pages_per_mb;
|
||||||
}
|
}
|
||||||
|
|
||||||
fil_flush_low(space);
|
fil_flush_low(space, true);
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2408,6 +2408,9 @@ innobase_start_or_create_for_mysql()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stat_info.type != OS_FILE_TYPE_FILE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (!srv_file_check_mode(logfilename)) {
|
if (!srv_file_check_mode(logfilename)) {
|
||||||
return(DB_ERROR);
|
return(DB_ERROR);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user