Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
This commit is contained in:
commit
3b9273d203
12
.travis.yml
12
.travis.yml
@ -40,13 +40,15 @@ matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
# disable cache - was out of disk space
|
||||
cache: false
|
||||
script:
|
||||
- ${CC} --version ; ${CXX} --version
|
||||
- source .travis.compiler.sh
|
||||
# https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
|
||||
# in trusty containers
|
||||
- export MTR_MEM=/tmp
|
||||
- env DEB_BUILD_OPTIONS="parallel=6" debian/autobake-deb.sh;
|
||||
- env DEB_BUILD_OPTIONS="parallel=6" MYSQL_BUILD_PATH=/usr/local/bin:/usr/bin:/bin debian/autobake-deb.sh;
|
||||
- ccache --show-stats
|
||||
# Until OSX becomes a bit more stable: MDEV-12435
|
||||
allow_failures:
|
||||
@ -62,13 +64,6 @@ matrix:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
|
||||
# MDEV-13002 plugins.server_audit and plugins.thread_pool_server_audit test fail due to mysqltest error
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
|
||||
|
||||
# Matrix include for coverity
|
||||
# - env:
|
||||
@ -151,6 +146,7 @@ addons:
|
||||
- libdistro-info-perl
|
||||
- uuid-dev
|
||||
- devscripts # implicit for any build on Ubuntu
|
||||
- fakeroot
|
||||
|
||||
# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
|
||||
|
||||
|
@ -35,6 +35,11 @@ fi
|
||||
# git clean -fdX removes all ignored (build) files
|
||||
commands="\
|
||||
git clean -fdX
|
||||
cd ./libmariadb
|
||||
git submodule update
|
||||
cd ../storage/rocksdb/rocksdb
|
||||
git submodule update
|
||||
cd ../../..
|
||||
|
||||
path=`dirname $0`
|
||||
. \"$path/autorun.sh\""
|
||||
|
@ -289,6 +289,11 @@ gcov_compile_flags="-fprofile-arcs -ftest-coverage"
|
||||
gcov_compile_flags="$gcov_compile_flags -DDISABLE_TAO_ASM"
|
||||
gcov_compile_flags="$gcov_compile_flags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov"
|
||||
|
||||
#
|
||||
# The following plugins doesn't work on 32 bit systems
|
||||
disable_64_bit_plugins="--without-plugin-tokudb --without-plugin-rocksdb"
|
||||
|
||||
|
||||
# GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well
|
||||
# as on the compiler command line), and this requires setting LDFLAGS for BDB.
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 2005, 2006 MySQL AB
|
||||
# Use is subject to license terms
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; version 2
|
||||
# of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301, USA
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
extra_flags="$amd64_cflags $debug_cflags"
|
||||
extra_configs="$amd64_configs $debug_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -1,7 +0,0 @@
|
||||
#! /bin/sh
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
extra_flags="$amd64_cflags -pg -g"
|
||||
extra_configs="$amd64_configs $max_configs --disable-shared $static_link"
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -20,7 +20,7 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $fast_cflags"
|
||||
extra_configs="$pentium_configs"
|
||||
extra_configs="$pentium_configs $disable_64_bit_plugins"
|
||||
strip=yes
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -19,6 +19,6 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -5,6 +5,6 @@ set -- "$@" --with-debug=full
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs $all_configs $error_inject --with-experimental-collations"
|
||||
extra_configs="$pentium_configs $debug_configs $all_configs $error_inject --with-experimental-collations $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -19,6 +19,6 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs $max_configs $error_inject --with-experimental-collations"
|
||||
extra_configs="$pentium_configs $debug_configs $max_configs $error_inject --with-experimental-collations $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -20,6 +20,6 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs $max_no_embedded_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $max_no_embedded_configs $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -1,24 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# 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 Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -1,10 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Builds server without query cache support
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs $max_no_qc_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -19,7 +19,7 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags"
|
||||
extra_configs="$pentium_configs $debug_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $disable_64_bit_plugins"
|
||||
|
||||
extra_configs="$extra_configs --with-debug --with-ssl=/usr"
|
||||
|
||||
|
@ -7,6 +7,6 @@ set -- "$@" --with-debug=full
|
||||
extra_flags="$pentium_cflags $debug_cflags -g -O0 $wsrep_cflags"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$pentium_configs $debug_configs $wsrep_configs --with-wsrep"
|
||||
extra_configs="$pentium_configs $debug_configs $wsrep_configs --with-wsrep $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -40,6 +40,6 @@ export LDFLAGS="$gcov_link_flags"
|
||||
extra_flags="$pentium_cflags $debug_cflags $max_cflags $gcov_compile_flags"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -19,6 +19,6 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $gprof_compile_flags"
|
||||
extra_configs="$pentium_configs $debug_configs $gprof_link_flags"
|
||||
extra_configs="$pentium_configs $debug_configs $gprof_link_flags $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -35,6 +35,6 @@ extra_flags="$fast_cflags -unroll2 -ip -mp -restrict"
|
||||
# icpc: error: problem during multi-file optimization compilation (code 1)
|
||||
extra_flags="$extra_flags -no-ipo"
|
||||
base_cxxflags="-fno-exceptions -fno-rtti"
|
||||
extra_configs="$pentium_configs $static_link"
|
||||
extra_configs="$pentium_configs $static_link $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -20,6 +20,6 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $fast_cflags -g"
|
||||
extra_configs="$pentium_configs $max_configs"
|
||||
extra_configs="$pentium_configs $max_configs $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -1,28 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 2000 MySQL AB
|
||||
# Use is subject to license terms
|
||||
#
|
||||
# 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 Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $fast_cflags"
|
||||
extra_configs="$pentium_configs --without-server"
|
||||
|
||||
make=no
|
||||
strip=yes
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -33,6 +33,6 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
||||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_64_bit_plugins"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -1,26 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; version 2
|
||||
# of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301, USA
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
||||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $fast_cflags $wsrep_cflags"
|
||||
extra_configs="$pentium_configs $wsrep_configs --with-wsrep"
|
||||
extra_configs="$pentium_configs $wsrep_configs --with-wsrep $disable_64_bit_plugins"
|
||||
|
||||
#strip=yes
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (c) 2005, 2006 MySQL AB
|
||||
# Use is subject to license terms
|
||||
#
|
||||
# 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 Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$ppc_cflags $debug_cflags"
|
||||
extra_configs="$debug_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -422,14 +422,6 @@ typedef struct st_io_cache /* Used when cacheing files */
|
||||
/* The non-inclusive boundary of the valid write area */
|
||||
uchar *write_end;
|
||||
|
||||
/*
|
||||
Current_pos and current_end are convenience variables used by
|
||||
my_b_tell() and other routines that need to know the current offset
|
||||
current_pos points to &write_pos, and current_end to &write_end in a
|
||||
WRITE_CACHE, and &read_pos and &read_end respectively otherwise
|
||||
*/
|
||||
uchar **current_pos, **current_end;
|
||||
|
||||
/*
|
||||
The lock is for append buffer used in SEQ_READ_APPEND cache
|
||||
need mutex copying from append buffer to read buffer.
|
||||
@ -584,7 +576,11 @@ static inline size_t my_b_fill(IO_CACHE *info)
|
||||
|
||||
static inline my_off_t my_b_tell(const IO_CACHE *info)
|
||||
{
|
||||
return info->pos_in_file + (*info->current_pos - info->request_pos);
|
||||
if (info->type == WRITE_CACHE) {
|
||||
return info->pos_in_file + (info->write_pos - info->request_pos);
|
||||
|
||||
}
|
||||
return info->pos_in_file + (info->read_pos - info->request_pos);
|
||||
}
|
||||
|
||||
static inline my_off_t my_b_write_tell(const IO_CACHE *info)
|
||||
@ -609,7 +605,10 @@ static inline my_off_t my_b_get_pos_in_file(const IO_CACHE *info)
|
||||
|
||||
static inline size_t my_b_bytes_in_cache(const IO_CACHE *info)
|
||||
{
|
||||
return *info->current_end - *info->current_pos;
|
||||
if (info->type == WRITE_CACHE) {
|
||||
return info->write_end - info->write_pos;
|
||||
}
|
||||
return info->read_end - info->read_pos;
|
||||
}
|
||||
|
||||
int my_b_copy_to_file(IO_CACHE *cache, FILE *file);
|
||||
@ -803,7 +802,6 @@ extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize,
|
||||
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
|
||||
my_off_t seek_offset, my_bool use_async_io,
|
||||
my_bool clear_cache);
|
||||
extern void setup_io_cache(IO_CACHE* info);
|
||||
extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
|
||||
IO_CACHE *write_cache, uint num_threads);
|
||||
|
||||
|
@ -8,4 +8,5 @@ if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_N
|
||||
{
|
||||
--skip Test requires wsrep_on=ON
|
||||
}
|
||||
--source include/wait_until_ready.inc
|
||||
|
||||
|
@ -1002,3 +1002,56 @@ f
|
||||
2
|
||||
DROP TABLE cte;
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-13107: SHOW TABLE STATUS, SHOW CREATE VIEW
|
||||
# for CTEs that use derived tables
|
||||
#
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (3), (1), (2);
|
||||
create table t2 (b int) engine=myisam;
|
||||
insert into t2 values (2), (10);
|
||||
create view v1 as
|
||||
with t as (select s.a from (select t1.a from t1) s),
|
||||
r as(select t.a from t2, t where t2.b=t.a)
|
||||
select a from r;
|
||||
create view v2 as
|
||||
with t as (select s.a from (select t1.a from t1) s),
|
||||
r as(select t.a from t2, t where t2.b=t.a)
|
||||
select a from t1;
|
||||
show table status;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `r`.`a` AS `a` from `r` latin1 latin1_swedish_ci
|
||||
show create view v2;
|
||||
View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `test`.`t1`.`a` AS `a` from `test`.`t1` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
2
|
||||
select * from v2;
|
||||
a
|
||||
3
|
||||
1
|
||||
2
|
||||
prepare stmt1 from "select * from v1";
|
||||
execute stmt1;
|
||||
a
|
||||
2
|
||||
execute stmt1;
|
||||
a
|
||||
2
|
||||
prepare stmt2 from "select * from v2";
|
||||
execute stmt2;
|
||||
a
|
||||
3
|
||||
1
|
||||
2
|
||||
execute stmt2;
|
||||
a
|
||||
3
|
||||
1
|
||||
2
|
||||
deallocate prepare stmt1;
|
||||
deallocate prepare stmt2;
|
||||
drop view v1,v2;
|
||||
drop table t1,t2;
|
||||
|
@ -8725,3 +8725,60 @@ EXPLAIN
|
||||
}
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-13193: pushdown of equality extracted from multiple equality
|
||||
#
|
||||
CREATE TABLE t1 (i1 int, KEY(i1)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (2),(4);
|
||||
CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2;
|
||||
SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq
|
||||
WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 );
|
||||
i1 i2
|
||||
explain format=json SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq
|
||||
WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 );
|
||||
EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ref",
|
||||
"possible_keys": ["i1"],
|
||||
"key": "i1",
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["i1"],
|
||||
"ref": ["const"],
|
||||
"rows": 1,
|
||||
"filtered": 100,
|
||||
"using_index": true
|
||||
},
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
"table_name": "<derived3>",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "v2.i2 = 1"
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "256Kb",
|
||||
"join_type": "BNL",
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t2.i2 = 1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DROP VIEW v2;
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -1107,7 +1107,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY t2 ref a a 4 const 1 Using index
|
||||
1 PRIMARY <derived2> ref key0 key0 8 const,const 1
|
||||
2 DERIVED t3 ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
|
||||
2 DERIVED t3 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
|
||||
SELECT * FROM t1, t2, v1 WHERE t2.a=t1.a AND t2.a=v1.a AND t2.a=v1.b;
|
||||
a a a b
|
||||
c c c c
|
||||
|
@ -1158,9 +1158,17 @@ The following options may be given as the first argument:
|
||||
--time-format=name The TIME format (ignored)
|
||||
--timed-mutexes Specify whether to time mutexes. Deprecated, has no
|
||||
effect.
|
||||
--tmp-table-size=# If an internal in-memory temporary table exceeds this
|
||||
--tmp-disk-table-size=#
|
||||
Max size for data for an internal temporary on-disk
|
||||
MyISAM or Aria table.
|
||||
--tmp-memory-table-size=#
|
||||
If an internal in-memory temporary table exceeds this
|
||||
size, MySQL will automatically convert it to an on-disk
|
||||
MyISAM or Aria table
|
||||
MyISAM or Aria table. Same as tmp_table_size.
|
||||
--tmp-table-size=# Alias for tmp_memory_table_size. If an internal in-memory
|
||||
temporary table exceeds this size, MySQL will
|
||||
automatically convert it to an on-disk MyISAM or Aria
|
||||
table.
|
||||
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
|
||||
separated by a colon (:), in this case they are used in a
|
||||
round-robin fashion
|
||||
@ -1515,6 +1523,8 @@ thread-pool-stall-limit 500
|
||||
thread-stack 299008
|
||||
time-format %H:%i:%s
|
||||
timed-mutexes FALSE
|
||||
tmp-disk-table-size 18446744073709551615
|
||||
tmp-memory-table-size 16777216
|
||||
tmp-table-size 16777216
|
||||
transaction-alloc-block-size 8192
|
||||
transaction-isolation REPEATABLE-READ
|
||||
|
@ -6501,3 +6501,14 @@ DROP VIEW v;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-13197 Parser refactoring for CREATE VIEW,TRIGGER,SP,UDF,EVENT
|
||||
#
|
||||
ALTER VIEW IF NOT EXISTS v1 AS SELECT 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IF NOT EXISTS v1 AS SELECT 1' at line 1
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -3085,3 +3085,57 @@ select max(id), rank() over (order by max(id)) from t1 where id < 3;
|
||||
max(id) rank() over (order by max(id))
|
||||
2 1
|
||||
drop table t1;
|
||||
#
|
||||
# main.win failure post MDEV-12336
|
||||
#
|
||||
create table t(a decimal(35,10), b int);
|
||||
insert into t values (1, 10), (2, 20), (3, 30);
|
||||
prepare stmt from "SELECT (CASE WHEN sum(t.a) over (partition by t.b)=1 THEN 1000 ELSE 300 END) AS a FROM t";
|
||||
execute stmt;
|
||||
a
|
||||
1000
|
||||
300
|
||||
300
|
||||
drop table t;
|
||||
#
|
||||
# MDEV-12851 case with window functions query crashes server
|
||||
#
|
||||
create table t1(dt datetime);
|
||||
insert into t1 values ('2017-05-17'), ('2017-05-18');
|
||||
select dt,
|
||||
case when (max(dt) over (order by dt rows between 1 following and 1 following) is null)
|
||||
then '9999-12-31 12:00:00'
|
||||
else max(dt) over (order by dt rows between 1 following and 1 following)
|
||||
end x,
|
||||
case when (max(dt) over (order by dt rows between 1 following and 1 following) is not null)
|
||||
then '9999-12-31 12:00:00'
|
||||
else max(dt) over (order by dt rows between 1 following and 1 following)
|
||||
end x
|
||||
from t1;
|
||||
dt x x
|
||||
2017-05-17 00:00:00 2017-05-18 00:00:00 9999-12-31 12:00:00
|
||||
2017-05-18 00:00:00 9999-12-31 12:00:00 NULL
|
||||
drop table t1;
|
||||
create table t1(i int);
|
||||
insert into t1 values (null),(1),(2);
|
||||
select max(i) over (order by i),
|
||||
max(i) over (order by i) is null,
|
||||
max(i) over (order by i) is not null
|
||||
from t1;
|
||||
max(i) over (order by i) max(i) over (order by i) is null max(i) over (order by i) is not null
|
||||
NULL 1 0
|
||||
1 0 1
|
||||
2 0 1
|
||||
drop table t1;
|
||||
#
|
||||
# Start of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-13240 Wrong warning with MAX(datetime_field) OVER (...)
|
||||
#
|
||||
CREATE TABLE t1 (dt DATETIME);
|
||||
INSERT INTO t1 VALUES ('2017-05-17');
|
||||
SELECT MAX(dt) OVER (ORDER BY dt ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) FROM t1;
|
||||
MAX(dt) OVER (ORDER BY dt ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING)
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
CREATE TABLE t1 (c1 INT, c2 VARCHAR(30));
|
||||
PREPARE populate_table FROM "INSERT into t1 values (1, 'manual_insert_1'),
|
||||
(4, 'manual_insert_2')";
|
||||
INSERT INTO t1 SELECT row_number() over(), "should_have_0" FROM t1;
|
||||
INSERT INTO t1 SELECT row_number() over(), "should_have_NULL" FROM t1;
|
||||
INSERT INTO t1 SELECT 1 + row_number() over(), "should_have_2" FROM t1;
|
||||
EXECUTE populate_table;
|
||||
INSERT INTO t1 SELECT 10 + row_number() over(), "should repeat 4 times [11-14]" FROM t1;
|
||||
@ -13,8 +13,8 @@ c1 c2
|
||||
12 should repeat 4 times [11-14]
|
||||
13 should repeat 4 times [11-14]
|
||||
14 should repeat 4 times [11-14]
|
||||
0 should_have_0
|
||||
2 should_have_2
|
||||
NULL should_have_NULL
|
||||
DELETE FROM t1;
|
||||
EXECUTE populate_table;
|
||||
INSERT INTO t1
|
||||
|
@ -43,6 +43,6 @@ a
|
||||
1
|
||||
2
|
||||
3
|
||||
InnoDB: Last MySQL binlog file position 0 <pos>, file name ./master-bin.000001
|
||||
InnoDB: Last binlog file './master-bin.000001', position <pos>
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t1;
|
||||
|
@ -44,6 +44,6 @@ a
|
||||
1
|
||||
2
|
||||
3
|
||||
InnoDB: Last MySQL binlog file position 0 <pos>, file name ./master-bin.000001
|
||||
InnoDB: Last binlog file './master-bin.000001', position <pos>
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t1;
|
||||
|
@ -340,7 +340,7 @@ WHERE engine='innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
1
|
||||
1
|
||||
FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ pages; LSN=\d+/ in mysqld.1.err
|
||||
FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err
|
||||
# Cleanup
|
||||
bak_ib_logfile0
|
||||
bak_ib_logfile1
|
||||
|
@ -33,16 +33,16 @@ ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
|
||||
FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
|
||||
FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
|
||||
FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
SELECT * FROM t1;
|
||||
@ -56,7 +56,7 @@ ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err
|
||||
|
@ -9,7 +9,7 @@
|
||||
# Don't test this under valgrind, memory leaks will occur as we crash
|
||||
--source include/not_valgrind.inc
|
||||
|
||||
# The test case currently uses grep and tail, which may be unavailable on
|
||||
# The test case currently uses sed and tail, which may be unavailable on
|
||||
# some windows systems. But see MWL#191 for how to remove the need for grep.
|
||||
--source include/not_windows.inc
|
||||
|
||||
@ -99,7 +99,7 @@ SELECT * FROM t1 ORDER BY a;
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let pos=`select $binlog_start_pos + 730`;
|
||||
--replace_result $pos <pos>
|
||||
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
|
||||
--exec sed -ne 's/.*\(InnoDB: Last binlog file .* position.*\)/\1/p' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
|
||||
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t1;
|
||||
|
@ -9,7 +9,7 @@
|
||||
# Don't test this under valgrind, memory leaks will occur as we crash
|
||||
--source include/not_valgrind.inc
|
||||
|
||||
# The test case currently uses grep and tail, which may be unavailable on
|
||||
# The test case currently uses sed and tail, which may be unavailable on
|
||||
# some windows systems. But see MWL#191 for how to remove the need for grep.
|
||||
--source include/not_windows.inc
|
||||
|
||||
@ -100,6 +100,6 @@ SELECT * FROM t1 ORDER BY a;
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let pos=`select $binlog_start_pos + 730`;
|
||||
--replace_result $pos <pos>
|
||||
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
|
||||
--exec sed -ne 's/.*\(InnoDB: Last binlog file .* position.*\)/\1/p' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t1;
|
||||
|
@ -218,7 +218,7 @@ eval $check_no_innodb;
|
||||
--source include/start_mysqld.inc
|
||||
eval $check_yes_innodb;
|
||||
--source include/shutdown_mysqld.inc
|
||||
--let SEARCH_PATTERN=Resizing redo log from 1\*\d+ to 3\*\d+ pages; LSN=\d+
|
||||
--let SEARCH_PATTERN=Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters=
|
||||
|
@ -100,14 +100,14 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
|
||||
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_5
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
|
||||
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --innodb-read-only
|
||||
@ -122,7 +122,7 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
|
||||
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_7
|
||||
@ -170,7 +170,7 @@ EOF
|
||||
--source include/start_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size;
|
||||
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes;
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $MYSQLD_DATADIR/ib_logfile0
|
||||
--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
|
||||
|
@ -135,12 +135,29 @@ INSERT INTO articles (title, body) VALUES
|
||||
('How To Use MySQL Well','After you went through a ...'),
|
||||
('Optimizing MySQL','In this tutorial we will show ...'),
|
||||
('1001 MySQL Tricks','How to use full-text search engine'),
|
||||
('Go MySQL Tricks','How to use full text search engine');
|
||||
('Go MariaDB Tricks','How to use full text search engine');
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('MySQL');
|
||||
id title body
|
||||
6 MySQL Tutorial DBMS stands for MySQL DataBase ...
|
||||
7 How To Use MySQL Well After you went through a ...
|
||||
8 Optimizing MySQL In this tutorial we will show ...
|
||||
9 1001 MySQL Tricks How to use full-text search engine
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('tutorial');
|
||||
id title body
|
||||
6 MySQL Tutorial DBMS stands for MySQL DataBase ...
|
||||
8 Optimizing MySQL In this tutorial we will show ...
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('Tricks');
|
||||
id title body
|
||||
9 1001 MySQL Tricks How to use full-text search engine
|
||||
10 Go MySQL Tricks How to use full text search engine
|
||||
10 Go MariaDB Tricks How to use full text search engine
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('full text search');
|
||||
id title body
|
||||
10 Go MariaDB Tricks How to use full text search engine
|
||||
9 1001 MySQL Tricks How to use full-text search engine
|
||||
SELECT COUNT(*) FROM articles;
|
||||
COUNT(*)
|
||||
5
|
||||
|
@ -145,13 +145,18 @@ INSERT INTO articles (title, body) VALUES
|
||||
('How To Use MySQL Well','After you went through a ...'),
|
||||
('Optimizing MySQL','In this tutorial we will show ...'),
|
||||
('1001 MySQL Tricks','How to use full-text search engine'),
|
||||
('Go MySQL Tricks','How to use full text search engine');
|
||||
('Go MariaDB Tricks','How to use full text search engine');
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
# Simple term search - 4 records expected
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('MySQL');
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('tutorial');
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('Tricks');
|
||||
SELECT * FROM articles WHERE
|
||||
MATCH(title, body) AGAINST('full text search');
|
||||
SELECT COUNT(*) FROM articles;
|
||||
DROP TABLE articles;
|
||||
|
||||
|
@ -1 +1,4 @@
|
||||
SET default_storage_engine=InnoDB;
|
||||
set @file_per_table=@@global.innodb_file_per_table;
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
SET GLOBAL innodb_file_per_table=@file_per_table;
|
||||
|
@ -1,12 +1,12 @@
|
||||
set global innodb_file_per_table=on;
|
||||
create table t1(a text) engine=innodb key_block_size=8;
|
||||
create table t1(a text) engine=innodb key_block_size=4;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
8192
|
||||
4096
|
||||
drop table t1;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
8192
|
||||
4096
|
||||
create table t2(a text) engine=innodb;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
|
@ -1 +0,0 @@
|
||||
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page.");
|
@ -1 +0,0 @@
|
||||
SET storage_engine=InnoDB;
|
@ -1,127 +0,0 @@
|
||||
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
|
||||
CREATE TABLE bug52745 (
|
||||
a2 int(10) unsigned DEFAULT NULL,
|
||||
col37 time DEFAULT NULL,
|
||||
col38 char(229) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col39 text,
|
||||
col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
col41 int(10) unsigned DEFAULT NULL,
|
||||
col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col43 smallint(5) unsigned zerofill DEFAULT NULL,
|
||||
col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col45 float unsigned zerofill DEFAULT NULL,
|
||||
col46 binary(1) DEFAULT NULL,
|
||||
col47 tinyint(4) DEFAULT NULL,
|
||||
col48 tinyint(1) DEFAULT NULL,
|
||||
col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
col50 binary(1) DEFAULT NULL,
|
||||
col51 double unsigned zerofill DEFAULT NULL,
|
||||
col52 int(10) unsigned DEFAULT NULL,
|
||||
col53 time DEFAULT NULL,
|
||||
col54 double unsigned DEFAULT NULL,
|
||||
col55 time DEFAULT NULL,
|
||||
col56 mediumtext CHARACTER SET latin2,
|
||||
col57 blob,
|
||||
col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000',
|
||||
col59 binary(1) DEFAULT NULL,
|
||||
col60 longblob,
|
||||
col61 time DEFAULT NULL,
|
||||
col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci,
|
||||
col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
col64 int(10) unsigned DEFAULT NULL,
|
||||
col65 date DEFAULT NULL,
|
||||
col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
col67 binary(1) DEFAULT NULL,
|
||||
col68 tinyblob,
|
||||
col69 date DEFAULT NULL,
|
||||
col70 tinyint(3) unsigned zerofill DEFAULT NULL,
|
||||
col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col72 datetime DEFAULT NULL,
|
||||
col73 smallint(5) unsigned zerofill DEFAULT NULL,
|
||||
col74 longblob,
|
||||
col75 bit(34) DEFAULT NULL,
|
||||
col76 float unsigned zerofill DEFAULT NULL,
|
||||
col77 year(2) DEFAULT NULL,
|
||||
col78 tinyint(3) unsigned DEFAULT NULL,
|
||||
col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
|
||||
col80 datetime DEFAULT NULL,
|
||||
col81 smallint(6) DEFAULT NULL,
|
||||
col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
|
||||
col83 bigint(20) unsigned zerofill DEFAULT NULL,
|
||||
col84 float unsigned zerofill DEFAULT NULL,
|
||||
col85 double DEFAULT NULL,
|
||||
col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
|
||||
col87 varbinary(221) DEFAULT NULL,
|
||||
col88 double unsigned DEFAULT NULL,
|
||||
col89 float unsigned zerofill DEFAULT NULL,
|
||||
col90 tinyblob
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Note 1291 Column 'col82' has duplicated value '' in ENUM
|
||||
Note 1291 Column 'col82' has duplicated value '' in ENUM
|
||||
INSERT IGNORE INTO bug52745 SET
|
||||
col40='0000-00-00 00:00:00',
|
||||
col51=16547,
|
||||
col53='7711484',
|
||||
col54=-28604,
|
||||
col55='7112612',
|
||||
col56='wakefulness\'',
|
||||
col57=repeat('absorbefacient\'',106),
|
||||
col58=11027,
|
||||
col59='AM09gW7',
|
||||
col60=repeat('Noelani\'',16),
|
||||
col61='2520576',
|
||||
col62='substitutiv',
|
||||
col63='19950106155112',
|
||||
col64=-12038,
|
||||
col65='86238806',
|
||||
col66='19600719080256',
|
||||
col68=repeat('Sagittarius\'',54),
|
||||
col69='38943902',
|
||||
col70=1232,
|
||||
col71='Elora\'',
|
||||
col74=repeat('zipp',11),
|
||||
col75='0',
|
||||
col76=23254,
|
||||
col78=13247,
|
||||
col79='56219',
|
||||
col80='20500609035724',
|
||||
col81=11632,
|
||||
col82=7,
|
||||
col84=-23863,
|
||||
col85=6341,
|
||||
col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W',
|
||||
col88=16894,
|
||||
col89=6161,
|
||||
col90=repeat('gale',48);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'col53' at row 1
|
||||
Warning 1264 Out of range value for column 'col54' at row 1
|
||||
Warning 1265 Data truncated for column 'col59' at row 1
|
||||
Warning 1265 Data truncated for column 'col61' at row 1
|
||||
Warning 1264 Out of range value for column 'col64' at row 1
|
||||
Warning 1265 Data truncated for column 'col65' at row 1
|
||||
Warning 1264 Out of range value for column 'col66' at row 1
|
||||
Warning 1265 Data truncated for column 'col68' at row 1
|
||||
Warning 1265 Data truncated for column 'col69' at row 1
|
||||
Warning 1264 Out of range value for column 'col70' at row 1
|
||||
Warning 1264 Out of range value for column 'col78' at row 1
|
||||
Warning 1265 Data truncated for column 'col79' at row 1
|
||||
Warning 1264 Out of range value for column 'col84' at row 1
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1265 Data truncated for column 'col53' at row 1
|
||||
Warning 1264 Out of range value for column 'col54' at row 1
|
||||
Warning 1265 Data truncated for column 'col59' at row 1
|
||||
Warning 1265 Data truncated for column 'col61' at row 1
|
||||
Warning 1264 Out of range value for column 'col64' at row 1
|
||||
Warning 1265 Data truncated for column 'col65' at row 1
|
||||
Warning 1264 Out of range value for column 'col66' at row 1
|
||||
Warning 1265 Data truncated for column 'col68' at row 1
|
||||
Warning 1265 Data truncated for column 'col69' at row 1
|
||||
Warning 1264 Out of range value for column 'col70' at row 1
|
||||
Warning 1264 Out of range value for column 'col78' at row 1
|
||||
Warning 1265 Data truncated for column 'col79' at row 1
|
||||
Warning 1264 Out of range value for column 'col84' at row 1
|
||||
DROP TABLE bug52745;
|
@ -1,11 +0,0 @@
|
||||
SET GLOBAL innodb_strict_mode=on;
|
||||
set old_alter_table=0;
|
||||
CREATE TABLE bug53591(a text charset utf8 not null)
|
||||
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
|
||||
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
DROP TABLE bug53591;
|
||||
SET GLOBAL innodb_strict_mode=DEFAULT;
|
@ -1,119 +0,0 @@
|
||||
SET GLOBAL tx_isolation='REPEATABLE-READ';
|
||||
CREATE TABLE bug56680(
|
||||
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||
b CHAR(1),
|
||||
c INT,
|
||||
INDEX(b))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO bug56680 VALUES(0,'x',1);
|
||||
BEGIN;
|
||||
SELECT b FROM bug56680;
|
||||
b
|
||||
x
|
||||
connect con1,localhost,root,,;
|
||||
connection con1;
|
||||
BEGIN;
|
||||
UPDATE bug56680 SET b='X';
|
||||
connection default;
|
||||
SELECT b FROM bug56680;
|
||||
b
|
||||
x
|
||||
SELECT * FROM bug56680;
|
||||
a b c
|
||||
1 x 1
|
||||
connection con1;
|
||||
ROLLBACK;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
SELECT b FROM bug56680;
|
||||
b
|
||||
x
|
||||
SET GLOBAL tx_isolation='READ-UNCOMMITTED';
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
BEGIN;
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
b
|
||||
x
|
||||
x
|
||||
connect con1,localhost,root,,;
|
||||
connection con1;
|
||||
BEGIN;
|
||||
DELETE FROM bug56680 WHERE a=1;
|
||||
INSERT INTO bug56680 VALUES(1,'X',1);
|
||||
SELECT b FROM bug56680 LIMIT 3;
|
||||
b
|
||||
X
|
||||
x
|
||||
x
|
||||
connection default;
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
b
|
||||
x
|
||||
x
|
||||
CHECK TABLE bug56680;
|
||||
Table Op Msg_type Msg_text
|
||||
test.bug56680 check status OK
|
||||
connection con1;
|
||||
ROLLBACK;
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
b
|
||||
x
|
||||
x
|
||||
CHECK TABLE bug56680;
|
||||
Table Op Msg_type Msg_text
|
||||
test.bug56680 check status OK
|
||||
connection default;
|
||||
disconnect con1;
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
b
|
||||
x
|
||||
x
|
||||
CREATE TABLE bug56680_2(
|
||||
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||
b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
|
||||
c INT,
|
||||
INDEX(b))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
|
||||
BEGIN;
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 2;
|
||||
HEX(b)
|
||||
DF
|
||||
DF
|
||||
DELETE FROM bug56680_2 WHERE a=1;
|
||||
INSERT INTO bug56680_2 VALUES(1,'SS',1);
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 3;
|
||||
HEX(b)
|
||||
5353
|
||||
DF
|
||||
DF
|
||||
CHECK TABLE bug56680_2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.bug56680_2 check status OK
|
||||
ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 2;
|
||||
HEX(b)
|
||||
5353
|
||||
DF
|
||||
DELETE FROM bug56680_2 WHERE a=1;
|
||||
INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 3;
|
||||
HEX(b)
|
||||
DF
|
||||
DF
|
||||
DF
|
||||
CHECK TABLE bug56680_2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.bug56680_2 check status OK
|
||||
DROP TABLE bug56680_2;
|
||||
DROP TABLE bug56680;
|
@ -1,13 +0,0 @@
|
||||
set global innodb_file_per_table=on;
|
||||
create table t1(a text) engine=innodb key_block_size=8;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
8192
|
||||
drop table t1;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
8192
|
||||
create table t2(a text) engine=innodb;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
drop table t2;
|
@ -1,12 +1,12 @@
|
||||
--source include/innodb_page_size_small.inc
|
||||
#
|
||||
# Test case for bug 36172
|
||||
#
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_innodb_16k.inc
|
||||
set @file_per_table=@@global.innodb_file_per_table;
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
|
||||
SET default_storage_engine=InnoDB;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
|
||||
# we do not really care about what gets printed, we are only
|
||||
# interested in getting success or failure according to our
|
||||
@ -15,11 +15,6 @@ SET default_storage_engine=InnoDB;
|
||||
-- disable_query_log
|
||||
-- disable_result_log
|
||||
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
|
||||
DROP TABLE IF EXISTS `table0`;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
|
||||
SET sql_mode = default;
|
||||
insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
|
||||
@ -27,4 +22,6 @@ CHECK TABLE table0 EXTENDED;
|
||||
INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
|
||||
CHECK TABLE table0 EXTENDED;
|
||||
DROP TABLE table0;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
||||
-- enable_query_log
|
||||
-- enable_result_log
|
||||
SET GLOBAL innodb_file_per_table=@file_per_table;
|
||||
|
@ -1,13 +1,15 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_innodb_16k.inc
|
||||
-- source include/innodb_page_size_small.inc
|
||||
# lazy eviction might not be lazy enough when key rotation
|
||||
# scans through pages
|
||||
-- source include/not_encrypted.inc
|
||||
|
||||
let $per_table=`select @@innodb_file_per_table`;
|
||||
|
||||
-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
|
||||
|
||||
set global innodb_file_per_table=on;
|
||||
|
||||
create table t1(a text) engine=innodb key_block_size=8;
|
||||
|
||||
create table t1(a text) engine=innodb key_block_size=4;
|
||||
|
||||
-- disable_query_log
|
||||
|
||||
@ -20,13 +22,13 @@ while ($i)
|
||||
}
|
||||
-- enable_query_log
|
||||
|
||||
# we should be using some 8K pages
|
||||
# we should be using some 4K pages
|
||||
-- eval $query_i_s
|
||||
|
||||
drop table t1;
|
||||
|
||||
# because of lazy eviction at drop table there should still be some
|
||||
# used 8K pages
|
||||
# used 4K pages
|
||||
-- eval $query_i_s
|
||||
|
||||
# create a non-compressed table and insert enough into it to evict
|
||||
@ -44,7 +46,7 @@ while ($i)
|
||||
|
||||
-- enable_query_log
|
||||
|
||||
# now there should be no 8K pages in the buffer pool
|
||||
# now there should be no 4K pages in the buffer pool
|
||||
-- eval $query_i_s
|
||||
|
||||
drop table t2;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
||||
--source include/innodb_page_size_small.inc
|
||||
#
|
||||
# Test case for bug 36172
|
||||
#
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
SET storage_engine=InnoDB;
|
||||
|
||||
# we do not really care about what gets printed, we are only
|
||||
# interested in getting success or failure according to our
|
||||
# expectations
|
||||
|
||||
-- disable_query_log
|
||||
-- disable_result_log
|
||||
|
||||
CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
|
||||
insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
|
||||
CHECK TABLE table0 EXTENDED;
|
||||
INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
|
||||
CHECK TABLE table0 EXTENDED;
|
||||
DROP TABLE table0;
|
@ -1,100 +0,0 @@
|
||||
--source include/innodb_page_size_small.inc
|
||||
|
||||
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
|
||||
CREATE TABLE bug52745 (
|
||||
a2 int(10) unsigned DEFAULT NULL,
|
||||
col37 time DEFAULT NULL,
|
||||
col38 char(229) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col39 text,
|
||||
col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
col41 int(10) unsigned DEFAULT NULL,
|
||||
col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col43 smallint(5) unsigned zerofill DEFAULT NULL,
|
||||
col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col45 float unsigned zerofill DEFAULT NULL,
|
||||
col46 binary(1) DEFAULT NULL,
|
||||
col47 tinyint(4) DEFAULT NULL,
|
||||
col48 tinyint(1) DEFAULT NULL,
|
||||
col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
col50 binary(1) DEFAULT NULL,
|
||||
col51 double unsigned zerofill DEFAULT NULL,
|
||||
col52 int(10) unsigned DEFAULT NULL,
|
||||
col53 time DEFAULT NULL,
|
||||
col54 double unsigned DEFAULT NULL,
|
||||
col55 time DEFAULT NULL,
|
||||
col56 mediumtext CHARACTER SET latin2,
|
||||
col57 blob,
|
||||
col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000',
|
||||
col59 binary(1) DEFAULT NULL,
|
||||
col60 longblob,
|
||||
col61 time DEFAULT NULL,
|
||||
col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci,
|
||||
col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
col64 int(10) unsigned DEFAULT NULL,
|
||||
col65 date DEFAULT NULL,
|
||||
col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
col67 binary(1) DEFAULT NULL,
|
||||
col68 tinyblob,
|
||||
col69 date DEFAULT NULL,
|
||||
col70 tinyint(3) unsigned zerofill DEFAULT NULL,
|
||||
col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col72 datetime DEFAULT NULL,
|
||||
col73 smallint(5) unsigned zerofill DEFAULT NULL,
|
||||
col74 longblob,
|
||||
col75 bit(34) DEFAULT NULL,
|
||||
col76 float unsigned zerofill DEFAULT NULL,
|
||||
col77 year(2) DEFAULT NULL,
|
||||
col78 tinyint(3) unsigned DEFAULT NULL,
|
||||
col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
|
||||
col80 datetime DEFAULT NULL,
|
||||
col81 smallint(6) DEFAULT NULL,
|
||||
col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
|
||||
col83 bigint(20) unsigned zerofill DEFAULT NULL,
|
||||
col84 float unsigned zerofill DEFAULT NULL,
|
||||
col85 double DEFAULT NULL,
|
||||
col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
|
||||
col87 varbinary(221) DEFAULT NULL,
|
||||
col88 double unsigned DEFAULT NULL,
|
||||
col89 float unsigned zerofill DEFAULT NULL,
|
||||
col90 tinyblob
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
|
||||
INSERT IGNORE INTO bug52745 SET
|
||||
col40='0000-00-00 00:00:00',
|
||||
col51=16547,
|
||||
col53='7711484',
|
||||
col54=-28604,
|
||||
col55='7112612',
|
||||
col56='wakefulness\'',
|
||||
col57=repeat('absorbefacient\'',106),
|
||||
col58=11027,
|
||||
col59='AM09gW7',
|
||||
col60=repeat('Noelani\'',16),
|
||||
col61='2520576',
|
||||
col62='substitutiv',
|
||||
col63='19950106155112',
|
||||
col64=-12038,
|
||||
col65='86238806',
|
||||
col66='19600719080256',
|
||||
col68=repeat('Sagittarius\'',54),
|
||||
col69='38943902',
|
||||
col70=1232,
|
||||
col71='Elora\'',
|
||||
col74=repeat('zipp',11),
|
||||
col75='0',
|
||||
col76=23254,
|
||||
col78=13247,
|
||||
col79='56219',
|
||||
col80='20500609035724',
|
||||
col81=11632,
|
||||
col82=7,
|
||||
col84=-23863,
|
||||
col85=6341,
|
||||
col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W',
|
||||
col88=16894,
|
||||
col89=6161,
|
||||
col90=repeat('gale',48);
|
||||
|
||||
SHOW WARNINGS;
|
||||
|
||||
DROP TABLE bug52745;
|
@ -1,16 +0,0 @@
|
||||
--source include/innodb_page_size_small.inc
|
||||
|
||||
SET GLOBAL innodb_strict_mode=on;
|
||||
set old_alter_table=0;
|
||||
|
||||
CREATE TABLE bug53591(a text charset utf8 not null)
|
||||
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
|
||||
-- replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
|
||||
-- replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
|
||||
SHOW WARNINGS;
|
||||
|
||||
DROP TABLE bug53591;
|
||||
|
||||
SET GLOBAL innodb_strict_mode=DEFAULT;
|
@ -1,133 +0,0 @@
|
||||
--source include/innodb_page_size_small.inc
|
||||
#
|
||||
# Bug #56680 InnoDB may return wrong results from a case-insensitive index
|
||||
#
|
||||
-- disable_query_log
|
||||
SET @tx_isolation_orig = @@tx_isolation;
|
||||
# The flag innodb_change_buffering_debug is only available in debug builds.
|
||||
# It instructs InnoDB to try to evict pages from the buffer pool when
|
||||
# change buffering is possible, so that the change buffer will be used
|
||||
# whenever possible.
|
||||
-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
|
||||
-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET GLOBAL innodb_change_buffering_debug = 1;
|
||||
-- enable_query_log
|
||||
SET GLOBAL tx_isolation='REPEATABLE-READ';
|
||||
|
||||
CREATE TABLE bug56680(
|
||||
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||
b CHAR(1),
|
||||
c INT,
|
||||
INDEX(b))
|
||||
ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO bug56680 VALUES(0,'x',1);
|
||||
BEGIN;
|
||||
SELECT b FROM bug56680;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connection con1;
|
||||
BEGIN;
|
||||
UPDATE bug56680 SET b='X';
|
||||
|
||||
connection default;
|
||||
# This should return the last committed value 'x', but would return 'X'
|
||||
# due to a bug in row_search_for_mysql().
|
||||
SELECT b FROM bug56680;
|
||||
# This would always return the last committed value 'x'.
|
||||
SELECT * FROM bug56680;
|
||||
|
||||
connection con1;
|
||||
ROLLBACK;
|
||||
disconnect con1;
|
||||
|
||||
connection default;
|
||||
|
||||
SELECT b FROM bug56680;
|
||||
|
||||
# For the rest of this test, use the READ UNCOMMITTED isolation level
|
||||
# to see what exists in the secondary index.
|
||||
SET GLOBAL tx_isolation='READ-UNCOMMITTED';
|
||||
|
||||
# Create enough rows for the table, so that the insert buffer will be
|
||||
# used for modifying the secondary index page. There must be multiple
|
||||
# index pages, because changes to the root page are never buffered.
|
||||
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
|
||||
|
||||
BEGIN;
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connection con1;
|
||||
BEGIN;
|
||||
DELETE FROM bug56680 WHERE a=1;
|
||||
# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
|
||||
INSERT INTO bug56680 VALUES(1,'X',1);
|
||||
|
||||
# This should force an insert buffer merge, and return 'X' in the first row.
|
||||
SELECT b FROM bug56680 LIMIT 3;
|
||||
|
||||
connection default;
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
CHECK TABLE bug56680;
|
||||
|
||||
connection con1;
|
||||
ROLLBACK;
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
CHECK TABLE bug56680;
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
||||
SELECT b FROM bug56680 LIMIT 2;
|
||||
|
||||
CREATE TABLE bug56680_2(
|
||||
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||
b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
|
||||
c INT,
|
||||
INDEX(b))
|
||||
ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
|
||||
|
||||
BEGIN;
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 2;
|
||||
DELETE FROM bug56680_2 WHERE a=1;
|
||||
# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
|
||||
INSERT INTO bug56680_2 VALUES(1,'SS',1);
|
||||
|
||||
# This should force an insert buffer merge, and return 'SS' in the first row.
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 3;
|
||||
CHECK TABLE bug56680_2;
|
||||
|
||||
# Test this with compressed tables.
|
||||
ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 2;
|
||||
DELETE FROM bug56680_2 WHERE a=1;
|
||||
# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
|
||||
INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
|
||||
|
||||
# This should force an insert buffer merge, and return 0xdf in the first row.
|
||||
SELECT HEX(b) FROM bug56680_2 LIMIT 3;
|
||||
CHECK TABLE bug56680_2;
|
||||
|
||||
DROP TABLE bug56680_2;
|
||||
DROP TABLE bug56680;
|
||||
|
||||
-- disable_query_log
|
||||
SET GLOBAL tx_isolation = @tx_isolation_orig;
|
||||
-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig;
|
@ -1 +0,0 @@
|
||||
--innodb-buffer-pool-size=8M
|
@ -1,60 +0,0 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# lazy evition might not be lazy enough when key rotation
|
||||
# scans through pages
|
||||
-- source include/not_encrypted.inc
|
||||
|
||||
let $per_table=`select @@innodb_file_per_table`;
|
||||
|
||||
-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
|
||||
|
||||
set global innodb_file_per_table=on;
|
||||
|
||||
create table t1(a text) engine=innodb key_block_size=8;
|
||||
|
||||
-- disable_query_log
|
||||
|
||||
# insert some rows so we are using compressed pages
|
||||
-- let $i = 10
|
||||
while ($i)
|
||||
{
|
||||
insert into t1 values(repeat('abcdefghijklmnopqrstuvwxyz',100));
|
||||
dec $i;
|
||||
}
|
||||
-- enable_query_log
|
||||
|
||||
# we should be using some 8K pages
|
||||
-- eval $query_i_s
|
||||
|
||||
drop table t1;
|
||||
|
||||
# because of lazy eviction at drop table in 5.5 there should be some
|
||||
# used 8K pages
|
||||
-- eval $query_i_s
|
||||
|
||||
# create a non-compressed table and insert enough into it to evict
|
||||
# compressed pages
|
||||
create table t2(a text) engine=innodb;
|
||||
|
||||
-- disable_query_log
|
||||
|
||||
-- let $i = 400
|
||||
while ($i)
|
||||
{
|
||||
insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000));
|
||||
dec $i;
|
||||
}
|
||||
|
||||
-- enable_query_log
|
||||
|
||||
# now there should be no 8K pages in the buffer pool
|
||||
-- eval $query_i_s
|
||||
|
||||
drop table t2;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval set global innodb_file_per_table=$per_table;
|
@ -21,6 +21,7 @@ show status like '%libraries%';
|
||||
--sorted_result
|
||||
--replace_result .dll .so
|
||||
show plugins soname like '%example%';
|
||||
--replace_result 8 7
|
||||
show status like '%libraries%';
|
||||
--sorted_result
|
||||
--replace_result .dll .so
|
||||
|
@ -1426,11 +1426,11 @@ GLOBAL_VALUE 5242880
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 50331648
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BIGINT
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Size of each log file in a log group.
|
||||
NUMERIC_MIN_VALUE 1048576
|
||||
NUMERIC_MAX_VALUE 549755813888
|
||||
NUMERIC_BLOCK_SIZE 1048576
|
||||
NUMERIC_BLOCK_SIZE 65536
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- suite/sys_vars/r/sysvars_server_notembedded.result 2016-11-03 17:27:47.664855681 +0100
|
||||
+++ suite/sys_vars/r/sysvars_server_notembedded.reject 2016-11-03 17:23:05.686196749 +0100
|
||||
--- /home/my/maria-10.2/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result 2017-06-30 22:31:37.562118657 +0300
|
||||
+++ /home/my/maria-10.2/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.reject 2017-07-01 13:56:47.396950309 +0300
|
||||
@@ -57,7 +57,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 1
|
||||
@ -226,7 +226,7 @@
|
||||
NUMERIC_MAX_VALUE 1000
|
||||
@@ -1040,7 +1040,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
|
||||
VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT()
|
||||
NUMERIC_MIN_VALUE 4
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
@ -289,7 +289,7 @@
|
||||
READ_ONLY NO
|
||||
@@ -1723,7 +1723,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 31536000
|
||||
DEFAULT_VALUE 86400
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
@ -307,7 +307,7 @@
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -1947,7 +1947,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
DEFAULT_VALUE 2
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
@ -316,7 +316,7 @@
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2003,7 +2003,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 4194304
|
||||
DEFAULT_VALUE 16777216
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
@ -467,7 +467,7 @@
|
||||
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2255,7 +2255,7 @@
|
||||
@@ -2269,7 +2269,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1024
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -476,7 +476,7 @@
|
||||
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
|
||||
NUMERIC_MIN_VALUE 4
|
||||
NUMERIC_MAX_VALUE 8388608
|
||||
@@ -2269,7 +2269,7 @@
|
||||
@@ -2283,7 +2283,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -485,7 +485,7 @@
|
||||
VARIABLE_COMMENT Maximum stored procedure recursion depth
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 255
|
||||
@@ -2297,7 +2297,7 @@
|
||||
@@ -2311,7 +2311,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 32
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -494,7 +494,7 @@
|
||||
VARIABLE_COMMENT Unused, will be removed.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2325,7 +2325,7 @@
|
||||
@@ -2339,7 +2339,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 4294967295
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -503,7 +503,7 @@
|
||||
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2339,7 +2339,7 @@
|
||||
@@ -2353,7 +2353,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1024
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -512,7 +512,7 @@
|
||||
VARIABLE_COMMENT Unused
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2353,7 +2353,7 @@
|
||||
@@ -2367,7 +2367,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 8
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -521,7 +521,7 @@
|
||||
VARIABLE_COMMENT Unused
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2367,7 +2367,7 @@
|
||||
@@ -2381,7 +2381,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -530,7 +530,7 @@
|
||||
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2381,7 +2381,7 @@
|
||||
@@ -2395,7 +2395,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 262144
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -539,7 +539,7 @@
|
||||
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
|
||||
NUMERIC_MIN_VALUE 8192
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -2395,10 +2395,10 @@
|
||||
@@ -2409,10 +2409,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 256
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -552,7 +552,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -2409,7 +2409,7 @@
|
||||
@@ -2423,7 +2423,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1024
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -561,7 +561,7 @@
|
||||
VARIABLE_COMMENT Block size to be used for MyISAM index pages
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 16384
|
||||
@@ -2423,7 +2423,7 @@
|
||||
@@ -2437,7 +2437,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 6
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -570,7 +570,7 @@
|
||||
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
|
||||
NUMERIC_MIN_VALUE 2
|
||||
NUMERIC_MAX_VALUE 7
|
||||
@@ -2433,9 +2433,9 @@
|
||||
@@ -2447,9 +2447,9 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME MYISAM_MAX_SORT_FILE_SIZE
|
||||
SESSION_VALUE NULL
|
||||
@ -582,7 +582,7 @@
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this
|
||||
@@ -2447,14 +2447,14 @@
|
||||
@@ -2461,14 +2461,14 @@
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME MYISAM_MMAP_SIZE
|
||||
SESSION_VALUE NULL
|
||||
@ -600,7 +600,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
@@ -2479,10 +2479,10 @@
|
||||
@@ -2493,10 +2493,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -613,7 +613,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -2496,7 +2496,7 @@
|
||||
@@ -2510,7 +2510,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
|
||||
NUMERIC_MIN_VALUE 4096
|
||||
@ -622,7 +622,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -2549,7 +2549,7 @@
|
||||
@@ -2563,7 +2563,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16384
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -631,7 +631,7 @@
|
||||
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2563,7 +2563,7 @@
|
||||
@@ -2577,7 +2577,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 30
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -640,7 +640,7 @@
|
||||
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -2577,7 +2577,7 @@
|
||||
@@ -2591,7 +2591,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 10
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -649,7 +649,7 @@
|
||||
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2591,7 +2591,7 @@
|
||||
@@ -2605,7 +2605,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 60
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -658,7 +658,7 @@
|
||||
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -2661,7 +2661,7 @@
|
||||
@@ -2675,7 +2675,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -667,7 +667,7 @@
|
||||
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1
|
||||
@@ -2675,7 +2675,7 @@
|
||||
@@ -2689,7 +2689,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 62
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -676,7 +676,7 @@
|
||||
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 62
|
||||
@@ -2689,7 +2689,7 @@
|
||||
@@ -2703,7 +2703,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -685,7 +685,7 @@
|
||||
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
|
||||
NUMERIC_MIN_VALUE 10
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2717,7 +2717,7 @@
|
||||
@@ -2731,7 +2731,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -694,7 +694,7 @@
|
||||
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 5
|
||||
@@ -2745,7 +2745,7 @@
|
||||
@@ -2759,7 +2759,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -703,7 +703,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2759,7 +2759,7 @@
|
||||
@@ -2773,7 +2773,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -712,7 +712,7 @@
|
||||
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 200
|
||||
@@ -2773,7 +2773,7 @@
|
||||
@@ -2787,7 +2787,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -721,7 +721,7 @@
|
||||
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2787,7 +2787,7 @@
|
||||
@@ -2801,7 +2801,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -730,7 +730,7 @@
|
||||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2801,7 +2801,7 @@
|
||||
@@ -2815,7 +2815,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -739,7 +739,7 @@
|
||||
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2815,7 +2815,7 @@
|
||||
@@ -2829,7 +2829,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -748,7 +748,7 @@
|
||||
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2829,7 +2829,7 @@
|
||||
@@ -2843,7 +2843,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -757,7 +757,7 @@
|
||||
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2843,7 +2843,7 @@
|
||||
@@ -2857,7 +2857,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -766,7 +766,7 @@
|
||||
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2857,7 +2857,7 @@
|
||||
@@ -2871,7 +2871,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -775,7 +775,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2871,7 +2871,7 @@
|
||||
@@ -2885,7 +2885,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 80
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -784,7 +784,7 @@
|
||||
VARIABLE_COMMENT Maximum number of condition instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2885,7 +2885,7 @@
|
||||
@@ -2899,7 +2899,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -793,7 +793,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2899,7 +2899,7 @@
|
||||
@@ -2913,7 +2913,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1024
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -802,7 +802,7 @@
|
||||
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2913,7 +2913,7 @@
|
||||
@@ -2927,7 +2927,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 50
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -811,7 +811,7 @@
|
||||
VARIABLE_COMMENT Maximum number of file instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2927,7 +2927,7 @@
|
||||
@@ -2941,7 +2941,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 32768
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -820,7 +820,7 @@
|
||||
VARIABLE_COMMENT Maximum number of opened instrumented files.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2941,7 +2941,7 @@
|
||||
@@ -2955,7 +2955,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -829,7 +829,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -2955,7 +2955,7 @@
|
||||
@@ -2969,7 +2969,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 200
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -838,7 +838,7 @@
|
||||
VARIABLE_COMMENT Maximum number of mutex instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2969,7 +2969,7 @@
|
||||
@@ -2983,7 +2983,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -847,7 +847,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -2983,7 +2983,7 @@
|
||||
@@ -2997,7 +2997,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 40
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -856,7 +856,7 @@
|
||||
VARIABLE_COMMENT Maximum number of rwlock instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -2997,7 +2997,7 @@
|
||||
@@ -3011,7 +3011,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -865,7 +865,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 104857600
|
||||
@@ -3011,7 +3011,7 @@
|
||||
@@ -3025,7 +3025,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 10
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -874,7 +874,7 @@
|
||||
VARIABLE_COMMENT Maximum number of socket instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -3025,7 +3025,7 @@
|
||||
@@ -3039,7 +3039,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -883,7 +883,7 @@
|
||||
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3039,7 +3039,7 @@
|
||||
@@ -3053,7 +3053,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 150
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -892,16 +892,16 @@
|
||||
VARIABLE_COMMENT Maximum number of stage instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -3053,7 +3053,7 @@
|
||||
@@ -3067,7 +3067,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 185
|
||||
DEFAULT_VALUE 188
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Maximum number of statement instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -3067,7 +3067,7 @@
|
||||
@@ -3081,7 +3081,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -910,7 +910,7 @@
|
||||
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3081,7 +3081,7 @@
|
||||
@@ -3095,7 +3095,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -919,7 +919,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3095,7 +3095,7 @@
|
||||
@@ -3109,7 +3109,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 50
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -928,7 +928,7 @@
|
||||
VARIABLE_COMMENT Maximum number of thread instruments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 256
|
||||
@@ -3109,7 +3109,7 @@
|
||||
@@ -3123,7 +3123,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -937,7 +937,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3123,7 +3123,7 @@
|
||||
@@ -3137,7 +3137,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -946,7 +946,7 @@
|
||||
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3137,7 +3137,7 @@
|
||||
@@ -3151,7 +3151,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -955,7 +955,7 @@
|
||||
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -3151,7 +3151,7 @@
|
||||
@@ -3165,7 +3165,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -964,7 +964,7 @@
|
||||
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3165,7 +3165,7 @@
|
||||
@@ -3179,7 +3179,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE -1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -973,7 +973,7 @@
|
||||
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
|
||||
NUMERIC_MIN_VALUE -1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -3235,7 +3235,7 @@
|
||||
@@ -3249,7 +3249,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 32768
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -982,7 +982,7 @@
|
||||
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -3263,7 +3263,7 @@
|
||||
@@ -3277,7 +3277,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 15
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -991,7 +991,7 @@
|
||||
VARIABLE_COMMENT Limit of query profiling memory
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -3277,7 +3277,7 @@
|
||||
@@ -3291,7 +3291,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 5
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1000,7 +1000,7 @@
|
||||
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3347,7 +3347,7 @@
|
||||
@@ -3361,7 +3361,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16384
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1009,7 +1009,7 @@
|
||||
VARIABLE_COMMENT Allocation block size for query parsing and execution
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3361,7 +3361,7 @@
|
||||
@@ -3375,7 +3375,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1048576
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1018,7 +1018,7 @@
|
||||
VARIABLE_COMMENT Don't cache results that are bigger than this
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3375,7 +3375,7 @@
|
||||
@@ -3389,7 +3389,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 4096
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1027,7 +1027,7 @@
|
||||
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3392,7 +3392,7 @@
|
||||
@@ -3406,7 +3406,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The memory allocated to store results from old queries
|
||||
NUMERIC_MIN_VALUE 0
|
||||
@ -1036,7 +1036,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1024
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3445,7 +3445,7 @@
|
||||
@@ -3459,7 +3459,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 24576
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1045,7 +1045,7 @@
|
||||
VARIABLE_COMMENT Persistent buffer for query parsing and execution
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3459,7 +3459,7 @@
|
||||
@@ -3473,7 +3473,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 4096
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1054,7 +1054,7 @@
|
||||
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
|
||||
NUMERIC_MIN_VALUE 4096
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -3476,7 +3476,7 @@
|
||||
@@ -3490,7 +3490,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Maximum speed(KB/s) to read binlog from master (0 = no limit)
|
||||
NUMERIC_MIN_VALUE 0
|
||||
@ -1063,7 +1063,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3487,7 +3487,7 @@
|
||||
@@ -3501,7 +3501,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 131072
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1072,7 +1072,7 @@
|
||||
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
|
||||
NUMERIC_MIN_VALUE 8192
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -3515,7 +3515,7 @@
|
||||
@@ -3529,7 +3529,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 262144
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1081,7 +1081,7 @@
|
||||
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -3795,10 +3795,10 @@
|
||||
@@ -3809,10 +3809,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 8388608
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1094,7 +1094,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -3837,7 +3837,7 @@
|
||||
@@ -3851,7 +3851,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1103,7 +1103,7 @@
|
||||
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -4019,7 +4019,7 @@
|
||||
@@ -4033,7 +4033,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1112,7 +1112,7 @@
|
||||
VARIABLE_COMMENT Maximum number of parallel threads to use on slave for events in a single replication domain. When using multiple domains, this can be used to limit a single domain from grabbing all threads and thus stalling other domains. The default of 0 means to allow a domain to grab as many threads as it wants, up to the value of slave_parallel_threads.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16383
|
||||
@@ -4061,7 +4061,7 @@
|
||||
@@ -4075,7 +4075,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1073741824
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1121,7 +1121,7 @@
|
||||
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -4089,7 +4089,7 @@
|
||||
@@ -4103,7 +4103,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 131072
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1130,7 +1130,7 @@
|
||||
VARIABLE_COMMENT Limit on how much memory SQL threads should use per parallel replication thread when reading ahead in the relay log looking for opportunities for parallel replication. Only used when --slave-parallel-threads > 0.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483647
|
||||
@@ -4117,7 +4117,7 @@
|
||||
@@ -4131,7 +4131,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1139,7 +1139,7 @@
|
||||
VARIABLE_COMMENT If non-zero, number of threads to spawn to apply in parallel events on the slave that were group-committed on the master or were logged with GTID in different replication domains. Note that these threads are in addition to the IO and SQL threads, which are always created by a replication slave
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16383
|
||||
@@ -4131,7 +4131,7 @@
|
||||
@@ -4145,7 +4145,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1148,7 +1148,7 @@
|
||||
VARIABLE_COMMENT Alias for slave_parallel_threads
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16383
|
||||
@@ -4187,7 +4187,7 @@
|
||||
@@ -4201,7 +4201,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 10
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1157,7 +1157,7 @@
|
||||
VARIABLE_COMMENT Number of times the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout, before giving up and stopping
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -4215,7 +4215,7 @@
|
||||
@@ -4229,7 +4229,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 2
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1166,7 +1166,7 @@
|
||||
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -4274,7 +4274,7 @@
|
||||
@@ -4288,7 +4288,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
@ -1175,7 +1175,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -4579,7 +4579,7 @@
|
||||
@@ -4593,7 +4593,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 256
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1184,7 +1184,7 @@
|
||||
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 524288
|
||||
@@ -4677,7 +4677,7 @@
|
||||
@@ -4691,7 +4691,7 @@
|
||||
GLOBAL_VALUE_ORIGIN AUTO
|
||||
DEFAULT_VALUE 400
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1193,7 +1193,7 @@
|
||||
VARIABLE_COMMENT The number of cached table definitions
|
||||
NUMERIC_MIN_VALUE 400
|
||||
NUMERIC_MAX_VALUE 524288
|
||||
@@ -4691,7 +4691,7 @@
|
||||
@@ -4705,7 +4705,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 2000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1202,7 +1202,7 @@
|
||||
VARIABLE_COMMENT The number of cached open tables
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 1048576
|
||||
@@ -4719,7 +4719,7 @@
|
||||
@@ -4733,7 +4733,7 @@
|
||||
GLOBAL_VALUE_ORIGIN AUTO
|
||||
DEFAULT_VALUE 256
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1211,7 +1211,7 @@
|
||||
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16384
|
||||
@@ -4733,7 +4733,7 @@
|
||||
@@ -4747,7 +4747,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 10
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1220,16 +1220,45 @@
|
||||
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 512
|
||||
@@ -4946,7 +4946,7 @@
|
||||
@@ -4952,15 +4952,15 @@
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TMP_DISK_TABLE_SIZE
|
||||
-SESSION_VALUE 18446744073709551615
|
||||
-GLOBAL_VALUE 18446744073709551615
|
||||
+SESSION_VALUE 4294967295
|
||||
+GLOBAL_VALUE 4294967295
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
-DEFAULT_VALUE 18446744073709551615
|
||||
+DEFAULT_VALUE 4294967295
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM or Aria table
|
||||
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -4957,7 +4957,7 @@
|
||||
@@ -4974,7 +4974,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -4988,7 +4988,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -4999,7 +4999,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 8192
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1238,7 +1267,7 @@
|
||||
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 134217728
|
||||
@@ -4971,7 +4971,7 @@
|
||||
@@ -5013,7 +5013,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 4096
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1247,7 +1276,7 @@
|
||||
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 134217728
|
||||
@@ -5069,7 +5069,7 @@
|
||||
@@ -5111,7 +5111,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 28800
|
||||
VARIABLE_SCOPE SESSION
|
||||
@ -1256,7 +1285,7 @@
|
||||
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 31536000
|
||||
@@ -5173,7 +5173,7 @@
|
||||
@@ -5215,7 +5215,7 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME OPEN_FILES_LIMIT
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
@ -1265,7 +1294,7 @@
|
||||
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -5186,7 +5186,7 @@
|
||||
@@ -5228,7 +5228,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
|
||||
NUMERIC_MIN_VALUE 0
|
||||
@ -1274,7 +1303,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -5196,7 +5196,7 @@
|
||||
@@ -5238,7 +5238,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
|
||||
NUMERIC_MIN_VALUE 0
|
||||
@ -1283,7 +1312,7 @@
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -5281,7 +5281,7 @@
|
||||
@@ -5323,7 +5323,7 @@
|
||||
VARIABLE_NAME LOG_TC_SIZE
|
||||
GLOBAL_VALUE_ORIGIN AUTO
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
@ -5007,6 +5007,34 @@ NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TMP_DISK_TABLE_SIZE
|
||||
SESSION_VALUE 18446744073709551615
|
||||
GLOBAL_VALUE 18446744073709551615
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 18446744073709551615
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Max size for data for an internal temporary on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 18446744073709551615
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TMP_MEMORY_TABLE_SIZE
|
||||
SESSION_VALUE 16777216
|
||||
GLOBAL_VALUE 16777216
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16777216
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM or Aria table. Same as tmp_table_size.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 18446744073709551615
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TMP_TABLE_SIZE
|
||||
SESSION_VALUE 16777216
|
||||
GLOBAL_VALUE 16777216
|
||||
@ -5014,7 +5042,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16777216
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM or Aria table
|
||||
VARIABLE_COMMENT Alias for tmp_memory_table_size. If an internal in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM or Aria table.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 18446744073709551615
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
|
146
mysql-test/suite/sys_vars/r/tmp_disk_table_size_basic.result
Normal file
146
mysql-test/suite/sys_vars/r/tmp_disk_table_size_basic.result
Normal file
@ -0,0 +1,146 @@
|
||||
SET @start_global_value = @@global.tmp_disk_table_size;
|
||||
SET @start_session_value = @@session.tmp_disk_table_size;
|
||||
'#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
SET @@global.tmp_disk_table_size = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '100'
|
||||
SET @@global.tmp_disk_table_size = DEFAULT;
|
||||
SET @@session.tmp_disk_table_size = 200;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '200'
|
||||
SET @@session.tmp_disk_table_size = DEFAULT;
|
||||
'#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
SELECT @@global.tmp_disk_table_size >= 16777216;
|
||||
@@global.tmp_disk_table_size >= 16777216
|
||||
1
|
||||
SELECT @@session.tmp_disk_table_size >= 16777216;
|
||||
@@session.tmp_disk_table_size >= 16777216
|
||||
1
|
||||
'#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
SET @@global.tmp_disk_table_size = 1024;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
1024
|
||||
SET @@global.tmp_disk_table_size = 60020;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
60020
|
||||
SET @@global.tmp_disk_table_size = 4294967295;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
4294967295
|
||||
'#--------------------FN_DYNVARS_005_04-------------------------#'
|
||||
SET @@session.tmp_disk_table_size = 1024;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
@@session.tmp_disk_table_size
|
||||
1024
|
||||
SET @@session.tmp_disk_table_size = 4294967295;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
@@session.tmp_disk_table_size
|
||||
4294967295
|
||||
SET @@session.tmp_disk_table_size = 65535;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
@@session.tmp_disk_table_size
|
||||
65535
|
||||
'#------------------FN_DYNVARS_005_05-----------------------#'
|
||||
SET @@global.tmp_disk_table_size = 0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '0'
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
1024
|
||||
SET @@global.tmp_disk_table_size = -1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '-1024'
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
1024
|
||||
SET @@global.tmp_disk_table_size = 1000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '1000'
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
1024
|
||||
SET @@global.tmp_disk_table_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_disk_table_size'
|
||||
SET @@global.tmp_disk_table_size = OFF;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_disk_table_size'
|
||||
SET @@global.tmp_disk_table_size = True;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '1'
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
1024
|
||||
SET @@global.tmp_disk_table_size = False;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '0'
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
@@global.tmp_disk_table_size
|
||||
1024
|
||||
SET @@global.tmp_disk_table_size = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_disk_table_size'
|
||||
SET @@global.tmp_disk_table_size ="Test";
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_disk_table_size'
|
||||
SET @@session.tmp_disk_table_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_disk_table_size'
|
||||
SET @@session.tmp_disk_table_size = OFF;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_disk_table_size'
|
||||
SET @@session.tmp_disk_table_size = True;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '1'
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
@@session.tmp_disk_table_size
|
||||
1024
|
||||
SET @@session.tmp_disk_table_size = False;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '0'
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
@@session.tmp_disk_table_size
|
||||
1024
|
||||
SET @@session.tmp_disk_table_size = "Test";
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_disk_table_size'
|
||||
SET @@session.tmp_disk_table_size = 12345678901;
|
||||
SELECT @@session.tmp_disk_table_size IN (12345678901,4294967295);
|
||||
@@session.tmp_disk_table_size IN (12345678901,4294967295)
|
||||
1
|
||||
'#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
SELECT @@global.tmp_disk_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_disk_table_size';
|
||||
@@global.tmp_disk_table_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
SELECT @@session.tmp_disk_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_disk_table_size';
|
||||
@@session.tmp_disk_table_size = VARIABLE_VALUE
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
SET @@global.tmp_disk_table_size = 1024;
|
||||
SET @@tmp_disk_table_size = 4294967295;
|
||||
SELECT @@tmp_disk_table_size = @@global.tmp_disk_table_size;
|
||||
@@tmp_disk_table_size = @@global.tmp_disk_table_size
|
||||
0
|
||||
'#---------------------FN_DYNVARS_001_10----------------------#'
|
||||
SET @@tmp_disk_table_size = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_disk_table_size value: '100'
|
||||
SELECT @@tmp_disk_table_size = @@local.tmp_disk_table_size;
|
||||
@@tmp_disk_table_size = @@local.tmp_disk_table_size
|
||||
1
|
||||
SELECT @@local.tmp_disk_table_size = @@session.tmp_disk_table_size;
|
||||
@@local.tmp_disk_table_size = @@session.tmp_disk_table_size
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_11----------------------#'
|
||||
SET tmp_disk_table_size = 1027;
|
||||
SELECT @@tmp_disk_table_size;
|
||||
@@tmp_disk_table_size
|
||||
1027
|
||||
SELECT local.tmp_disk_table_size;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
SELECT global.tmp_disk_table_size;
|
||||
ERROR 42S02: Unknown table 'global' in field list
|
||||
SELECT tmp_disk_table_size = @@session.tmp_disk_table_size;
|
||||
ERROR 42S22: Unknown column 'tmp_disk_table_size' in 'field list'
|
||||
SET @@global.tmp_disk_table_size = @start_global_value;
|
||||
SET @@session.tmp_disk_table_size = @start_session_value;
|
25
mysql-test/suite/sys_vars/r/tmp_disk_table_size_func.result
Normal file
25
mysql-test/suite/sys_vars/r/tmp_disk_table_size_func.result
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
"Ensure that we get an error if we exceed tmp_disk_table_size"
|
||||
|
||||
SET @start_tmp_memory_table_size=@@session.tmp_memory_table_size;
|
||||
SET @start_tmp_disk_table_size=@@session.tmp_disk_table_size;
|
||||
set @@session.tmp_memory_table_size=1000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '1000'
|
||||
set @@session.tmp_disk_table_size=3000000;
|
||||
create table t1 (a int primary key, b varchar(2000));
|
||||
insert into t1 select seq,repeat(char(mod(seq,62)+64),seq) from seq_1_to_2000;
|
||||
insert into t1 values (20000,"A");
|
||||
select count(*) as c from t1 group by b having c>1;
|
||||
c
|
||||
2
|
||||
show status like "created_tmp_disk%";
|
||||
Variable_name Value
|
||||
Created_tmp_disk_tables 1
|
||||
set @@session.tmp_disk_table_size=1000000;
|
||||
select count(*) as c from t1 group by b having c>1;
|
||||
ERROR HY000: The table '#sql_xxx' is full
|
||||
show status like "created_tmp_disk%";
|
||||
Variable_name Value
|
||||
Created_tmp_disk_tables 2
|
||||
drop table t1;
|
165
mysql-test/suite/sys_vars/r/tmp_memory_table_size_basic.result
Normal file
165
mysql-test/suite/sys_vars/r/tmp_memory_table_size_basic.result
Normal file
@ -0,0 +1,165 @@
|
||||
SET @start_global_value = @@global.tmp_memory_table_size;
|
||||
SET @start_session_value = @@session.tmp_memory_table_size;
|
||||
'#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
SET @@global.tmp_memory_table_size = 10000;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
10000
|
||||
SET @@global.tmp_memory_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
16777216
|
||||
SET @@session.tmp_memory_table_size = 20000;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
@@session.tmp_memory_table_size
|
||||
20000
|
||||
SET @@session.tmp_memory_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
@@session.tmp_memory_table_size
|
||||
16777216
|
||||
'#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
SELECT @@global.tmp_memory_table_size >= 16777216;
|
||||
@@global.tmp_memory_table_size >= 16777216
|
||||
1
|
||||
SELECT @@session.tmp_memory_table_size >= 16777216;
|
||||
@@session.tmp_memory_table_size >= 16777216
|
||||
1
|
||||
'#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
SET @@global.tmp_memory_table_size = 1024;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
1024
|
||||
SET @@global.tmp_memory_table_size = 60020;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
60020
|
||||
SET @@global.tmp_memory_table_size = 4294967295;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
4294967295
|
||||
'#--------------------FN_DYNVARS_005_04-------------------------#'
|
||||
SET @@session.tmp_memory_table_size = 1024;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
@@session.tmp_memory_table_size
|
||||
1024
|
||||
SET @@session.tmp_memory_table_size = 4294967295;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
@@session.tmp_memory_table_size
|
||||
4294967295
|
||||
SET @@session.tmp_memory_table_size = 65535;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
@@session.tmp_memory_table_size
|
||||
65535
|
||||
'#------------------FN_DYNVARS_005_05-----------------------#'
|
||||
SET @@global.tmp_memory_table_size = 0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '0'
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
1024
|
||||
SET @@global.tmp_memory_table_size = -1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '-1024'
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
1024
|
||||
SET @@global.tmp_memory_table_size = 1000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '1000'
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
1024
|
||||
SET @@global.tmp_memory_table_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
|
||||
SET @@global.tmp_memory_table_size = OFF;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
|
||||
SET @@global.tmp_memory_table_size = True;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '1'
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
1024
|
||||
SET @@global.tmp_memory_table_size = False;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '0'
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
@@global.tmp_memory_table_size
|
||||
1024
|
||||
SET @@global.tmp_memory_table_size = 65530.34;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
|
||||
SET @@global.tmp_memory_table_size ="Test";
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
|
||||
SET @@session.tmp_memory_table_size = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
|
||||
SET @@session.tmp_memory_table_size = OFF;
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
|
||||
SET @@session.tmp_memory_table_size = True;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '1'
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
@@session.tmp_memory_table_size
|
||||
1024
|
||||
SET @@session.tmp_memory_table_size = False;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '0'
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
@@session.tmp_memory_table_size
|
||||
1024
|
||||
SET @@session.tmp_memory_table_size = "Test";
|
||||
ERROR 42000: Incorrect argument type to variable 'tmp_memory_table_size'
|
||||
SET @@session.tmp_memory_table_size = 12345678901;
|
||||
SELECT @@session.tmp_memory_table_size IN (12345678901,4294967295);
|
||||
@@session.tmp_memory_table_size IN (12345678901,4294967295)
|
||||
1
|
||||
'#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
SELECT @@global.tmp_memory_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_memory_table_size';
|
||||
@@global.tmp_memory_table_size = VARIABLE_VALUE
|
||||
1
|
||||
'#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
SELECT @@session.tmp_memory_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_memory_table_size';
|
||||
@@session.tmp_memory_table_size = VARIABLE_VALUE
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
SET @@global.tmp_memory_table_size = 1024;
|
||||
SET @@tmp_memory_table_size = 4294967295;
|
||||
SELECT @@tmp_memory_table_size = @@global.tmp_memory_table_size;
|
||||
@@tmp_memory_table_size = @@global.tmp_memory_table_size
|
||||
0
|
||||
'#---------------------FN_DYNVARS_001_10----------------------#'
|
||||
SET @@tmp_memory_table_size = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_memory_table_size value: '100'
|
||||
SELECT @@tmp_memory_table_size = @@local.tmp_memory_table_size;
|
||||
@@tmp_memory_table_size = @@local.tmp_memory_table_size
|
||||
1
|
||||
SELECT @@local.tmp_memory_table_size = @@session.tmp_memory_table_size;
|
||||
@@local.tmp_memory_table_size = @@session.tmp_memory_table_size
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_11----------------------#'
|
||||
SET tmp_memory_table_size = 1027;
|
||||
SELECT @@tmp_memory_table_size;
|
||||
@@tmp_memory_table_size
|
||||
1027
|
||||
SELECT local.tmp_memory_table_size;
|
||||
ERROR 42S02: Unknown table 'local' in field list
|
||||
SELECT global.tmp_memory_table_size;
|
||||
ERROR 42S02: Unknown table 'global' in field list
|
||||
SELECT tmp_memory_table_size = @@session.tmp_memory_table_size;
|
||||
ERROR 42S22: Unknown column 'tmp_memory_table_size' in 'field list'
|
||||
|
||||
"Check that tmp_memory_table_size and tmp_table_size are the same"
|
||||
|
||||
set @@session.tmp_memory_table_size=100000;
|
||||
select @@session.tmp_memory_table_size,@@session.tmp_table_size;
|
||||
@@session.tmp_memory_table_size @@session.tmp_table_size
|
||||
100000 100000
|
||||
set @@session.tmp_memory_table_size=200000;
|
||||
select @@session.tmp_memory_table_size,@@session.tmp_table_size;
|
||||
@@session.tmp_memory_table_size @@session.tmp_table_size
|
||||
200000 200000
|
||||
SET @@global.tmp_memory_table_size = @start_global_value;
|
||||
SET @@session.tmp_memory_table_size = @start_session_value;
|
207
mysql-test/suite/sys_vars/t/tmp_disk_table_size_basic.test
Normal file
207
mysql-test/suite/sys_vars/t/tmp_disk_table_size_basic.test
Normal file
@ -0,0 +1,207 @@
|
||||
###################### tmp_disk_table_size_basic.test ######################
|
||||
# #
|
||||
# Variable Name: tmp_disk_table_size #
|
||||
# Scope: GLOBAL | SESSION #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: numeric #
|
||||
# Default Value: system dependend #
|
||||
# Range: 1024-system dependend #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-13 #
|
||||
# Author: Salman #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable tmp_table_size #
|
||||
# that checks the behavior of this variable in the following ways#
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# Modified: 2008-12-04 HHunger #
|
||||
# removed the differences between 64 and 32 bit platforms #
|
||||
# #
|
||||
# Reference: #
|
||||
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
##############################################################
|
||||
# START OF tmp_disk_table_size TESTS #
|
||||
##############################################################
|
||||
|
||||
#############################################################
|
||||
# Save initial value #
|
||||
#############################################################
|
||||
|
||||
SET @start_global_value = @@global.tmp_disk_table_size;
|
||||
SET @start_session_value = @@session.tmp_disk_table_size;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
##############################################################
|
||||
# Display the DEFAULT value of tmp_disk_table_size #
|
||||
##############################################################
|
||||
|
||||
SET @@global.tmp_disk_table_size = 100;
|
||||
SET @@global.tmp_disk_table_size = DEFAULT;
|
||||
|
||||
SET @@session.tmp_disk_table_size = 200;
|
||||
SET @@session.tmp_disk_table_size = DEFAULT;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
########################################################################
|
||||
# Check the DEFAULT value of tmp_disk_table_size #
|
||||
########################################################################
|
||||
# The DEFAULT value is system dependend.
|
||||
# Therefore we have only a plausibility check here
|
||||
SELECT @@global.tmp_disk_table_size >= 16777216;
|
||||
SELECT @@session.tmp_disk_table_size >= 16777216;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
########################################################################
|
||||
# Change the value of tmp_disk_table_size to a valid value for GLOBAL Scope #
|
||||
########################################################################
|
||||
|
||||
SET @@global.tmp_disk_table_size = 1024;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
SET @@global.tmp_disk_table_size = 60020;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
SET @@global.tmp_disk_table_size = 4294967295;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
|
||||
#########################################################################
|
||||
# Change the value of tmp_disk_table_size to a valid value for SESSION Scope #
|
||||
#########################################################################
|
||||
|
||||
SET @@session.tmp_disk_table_size = 1024;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
|
||||
SET @@session.tmp_disk_table_size = 4294967295;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
SET @@session.tmp_disk_table_size = 65535;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
|
||||
##########################################################
|
||||
# Change the value of tmp_disk_table_size to an invalid value #
|
||||
##########################################################
|
||||
|
||||
SET @@global.tmp_disk_table_size = 0;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
|
||||
SET @@global.tmp_disk_table_size = -1024;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
|
||||
SET @@global.tmp_disk_table_size = 1000;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_disk_table_size = ON;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_disk_table_size = OFF;
|
||||
|
||||
SET @@global.tmp_disk_table_size = True;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
|
||||
SET @@global.tmp_disk_table_size = False;
|
||||
SELECT @@global.tmp_disk_table_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_disk_table_size = 65530.34;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_disk_table_size ="Test";
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_disk_table_size = ON;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_disk_table_size = OFF;
|
||||
|
||||
SET @@session.tmp_disk_table_size = True;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
|
||||
SET @@session.tmp_disk_table_size = False;
|
||||
SELECT @@session.tmp_disk_table_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_disk_table_size = "Test";
|
||||
|
||||
--disable_warnings
|
||||
SET @@session.tmp_disk_table_size = 12345678901;
|
||||
--enable_warnings
|
||||
# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
|
||||
SELECT @@session.tmp_disk_table_size IN (12345678901,4294967295);
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SELECT @@global.tmp_disk_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_disk_table_size';
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in SESSION Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SELECT @@session.tmp_disk_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_disk_table_size';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
########################################################################
|
||||
# Check if global and session variables are independent of each other #
|
||||
########################################################################
|
||||
|
||||
SET @@global.tmp_disk_table_size = 1024;
|
||||
SET @@tmp_disk_table_size = 4294967295;
|
||||
SELECT @@tmp_disk_table_size = @@global.tmp_disk_table_size;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
|
||||
##################################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without #
|
||||
# SCOPE points to same session variable #
|
||||
##################################################################
|
||||
|
||||
SET @@tmp_disk_table_size = 100;
|
||||
SELECT @@tmp_disk_table_size = @@local.tmp_disk_table_size;
|
||||
SELECT @@local.tmp_disk_table_size = @@session.tmp_disk_table_size;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
|
||||
#########################################################################
|
||||
# Check if tmp_disk_table_size can be accessed with and without @@ sign #
|
||||
#########################################################################
|
||||
|
||||
SET tmp_disk_table_size = 1027;
|
||||
SELECT @@tmp_disk_table_size;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.tmp_disk_table_size;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT global.tmp_disk_table_size;
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT tmp_disk_table_size = @@session.tmp_disk_table_size;
|
||||
|
||||
|
||||
####################################
|
||||
# Restore initial value #
|
||||
####################################
|
||||
|
||||
SET @@global.tmp_disk_table_size = @start_global_value;
|
||||
SET @@session.tmp_disk_table_size = @start_session_value;
|
||||
|
||||
###################################################
|
||||
# END OF tmp_disk_table_size TESTS #
|
||||
###################################################
|
||||
|
26
mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test
Normal file
26
mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test
Normal file
@ -0,0 +1,26 @@
|
||||
###################### tmp_memory_table_size_func.test ########################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
--echo
|
||||
--echo "Ensure that we get an error if we exceed tmp_disk_table_size"
|
||||
--echo
|
||||
|
||||
SET @start_tmp_memory_table_size=@@session.tmp_memory_table_size;
|
||||
SET @start_tmp_disk_table_size=@@session.tmp_disk_table_size;
|
||||
|
||||
set @@session.tmp_memory_table_size=1000;
|
||||
set @@session.tmp_disk_table_size=3000000;
|
||||
|
||||
create table t1 (a int primary key, b varchar(2000));
|
||||
insert into t1 select seq,repeat(char(mod(seq,62)+64),seq) from seq_1_to_2000;
|
||||
insert into t1 values (20000,"A");
|
||||
select count(*) as c from t1 group by b having c>1;
|
||||
show status like "created_tmp_disk%";
|
||||
set @@session.tmp_disk_table_size=1000000;
|
||||
--replace_regex /The table '.*' is full/The table '#sql_xxx' is full/
|
||||
--error ER_RECORD_FILE_FULL
|
||||
select count(*) as c from t1 group by b having c>1;
|
||||
show status like "created_tmp_disk%";
|
||||
drop table t1;
|
209
mysql-test/suite/sys_vars/t/tmp_memory_table_size_basic.test
Normal file
209
mysql-test/suite/sys_vars/t/tmp_memory_table_size_basic.test
Normal file
@ -0,0 +1,209 @@
|
||||
###################### tmp_memory_table_size_basic.test ######################
|
||||
# #
|
||||
# Variable Name: tmp_memory_table_size #
|
||||
# Scope: GLOBAL | SESSION #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: numeric #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable tmp_table_size #
|
||||
# that checks the behavior of this variable in the following ways#
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
##############################################################
|
||||
# START OF tmp_memory_table_size TESTS #
|
||||
##############################################################
|
||||
|
||||
#############################################################
|
||||
# Save initial value #
|
||||
#############################################################
|
||||
|
||||
SET @start_global_value = @@global.tmp_memory_table_size;
|
||||
SET @start_session_value = @@session.tmp_memory_table_size;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
##############################################################
|
||||
# Display the DEFAULT value of tmp_memory_table_size #
|
||||
##############################################################
|
||||
|
||||
SET @@global.tmp_memory_table_size = 10000;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
SET @@global.tmp_memory_table_size = DEFAULT;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
|
||||
SET @@session.tmp_memory_table_size = 20000;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
SET @@session.tmp_memory_table_size = DEFAULT;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
########################################################################
|
||||
# Check the DEFAULT value of tmp_memory_table_size #
|
||||
########################################################################
|
||||
# The DEFAULT value is system dependend.
|
||||
# Therefore we have only a plausibility check here
|
||||
SELECT @@global.tmp_memory_table_size >= 16777216;
|
||||
SELECT @@session.tmp_memory_table_size >= 16777216;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
########################################################################
|
||||
# Change the value of tmp_memory_table_size to a valid value for GLOBAL Scope #
|
||||
########################################################################
|
||||
|
||||
SET @@global.tmp_memory_table_size = 1024;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
SET @@global.tmp_memory_table_size = 60020;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
SET @@global.tmp_memory_table_size = 4294967295;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
|
||||
#########################################################################
|
||||
# Change the value of tmp_memory_table_size to a valid value for SESSION Scope #
|
||||
#########################################################################
|
||||
|
||||
SET @@session.tmp_memory_table_size = 1024;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
|
||||
SET @@session.tmp_memory_table_size = 4294967295;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
SET @@session.tmp_memory_table_size = 65535;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
|
||||
##########################################################
|
||||
# Change the value of tmp_memory_table_size to an invalid value #
|
||||
##########################################################
|
||||
|
||||
SET @@global.tmp_memory_table_size = 0;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
|
||||
SET @@global.tmp_memory_table_size = -1024;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
|
||||
SET @@global.tmp_memory_table_size = 1000;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_memory_table_size = ON;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_memory_table_size = OFF;
|
||||
|
||||
SET @@global.tmp_memory_table_size = True;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
|
||||
SET @@global.tmp_memory_table_size = False;
|
||||
SELECT @@global.tmp_memory_table_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_memory_table_size = 65530.34;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.tmp_memory_table_size ="Test";
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_memory_table_size = ON;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_memory_table_size = OFF;
|
||||
|
||||
SET @@session.tmp_memory_table_size = True;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
|
||||
SET @@session.tmp_memory_table_size = False;
|
||||
SELECT @@session.tmp_memory_table_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.tmp_memory_table_size = "Test";
|
||||
|
||||
--disable_warnings
|
||||
SET @@session.tmp_memory_table_size = 12345678901;
|
||||
--enable_warnings
|
||||
# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
|
||||
SELECT @@session.tmp_memory_table_size IN (12345678901,4294967295);
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SELECT @@global.tmp_memory_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_memory_table_size';
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in SESSION Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SELECT @@session.tmp_memory_table_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='tmp_memory_table_size';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
########################################################################
|
||||
# Check if global and session variables are independent of each other #
|
||||
########################################################################
|
||||
|
||||
SET @@global.tmp_memory_table_size = 1024;
|
||||
SET @@tmp_memory_table_size = 4294967295;
|
||||
SELECT @@tmp_memory_table_size = @@global.tmp_memory_table_size;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
|
||||
##################################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without #
|
||||
# SCOPE points to same session variable #
|
||||
##################################################################
|
||||
|
||||
SET @@tmp_memory_table_size = 100;
|
||||
SELECT @@tmp_memory_table_size = @@local.tmp_memory_table_size;
|
||||
SELECT @@local.tmp_memory_table_size = @@session.tmp_memory_table_size;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
|
||||
#########################################################################
|
||||
# Check if tmp_memory_table_size can be accessed with and without @@ sign #
|
||||
#########################################################################
|
||||
|
||||
SET tmp_memory_table_size = 1027;
|
||||
SELECT @@tmp_memory_table_size;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.tmp_memory_table_size;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT global.tmp_memory_table_size;
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT tmp_memory_table_size = @@session.tmp_memory_table_size;
|
||||
|
||||
--echo
|
||||
--echo "Check that tmp_memory_table_size and tmp_table_size are the same"
|
||||
--echo
|
||||
|
||||
set @@session.tmp_memory_table_size=100000;
|
||||
select @@session.tmp_memory_table_size,@@session.tmp_table_size;
|
||||
set @@session.tmp_memory_table_size=200000;
|
||||
select @@session.tmp_memory_table_size,@@session.tmp_table_size;
|
||||
|
||||
|
||||
####################################
|
||||
# Restore initial value #
|
||||
####################################
|
||||
|
||||
SET @@global.tmp_memory_table_size = @start_global_value;
|
||||
SET @@session.tmp_memory_table_size = @start_session_value;
|
||||
|
||||
###################################################
|
||||
# END OF tmp_memory_table_size TESTS #
|
||||
###################################################
|
||||
|
@ -1,4 +1,4 @@
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_wsrep_enabled.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
|
||||
--echo
|
||||
|
@ -681,3 +681,46 @@ SELECT * FROM cte;
|
||||
|
||||
DROP TABLE cte;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13107: SHOW TABLE STATUS, SHOW CREATE VIEW
|
||||
--echo # for CTEs that use derived tables
|
||||
--echo #
|
||||
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (3), (1), (2);
|
||||
create table t2 (b int) engine=myisam;
|
||||
insert into t2 values (2), (10);
|
||||
|
||||
create view v1 as
|
||||
with t as (select s.a from (select t1.a from t1) s),
|
||||
r as(select t.a from t2, t where t2.b=t.a)
|
||||
select a from r;
|
||||
|
||||
create view v2 as
|
||||
with t as (select s.a from (select t1.a from t1) s),
|
||||
r as(select t.a from t2, t where t2.b=t.a)
|
||||
select a from t1;
|
||||
|
||||
--disable_result_log
|
||||
show table status;
|
||||
--enable_result_log
|
||||
|
||||
show create view v1;
|
||||
show create view v2;
|
||||
|
||||
select * from v1;
|
||||
select * from v2;
|
||||
|
||||
prepare stmt1 from "select * from v1";
|
||||
execute stmt1;
|
||||
execute stmt1;
|
||||
prepare stmt2 from "select * from v2";
|
||||
execute stmt2;
|
||||
execute stmt2;
|
||||
|
||||
deallocate prepare stmt1;
|
||||
deallocate prepare stmt2;
|
||||
|
||||
drop view v1,v2;
|
||||
drop table t1,t2;
|
||||
|
@ -1526,3 +1526,25 @@ eval explain format=json $q;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13193: pushdown of equality extracted from multiple equality
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (i1 int, KEY(i1)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
|
||||
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (2),(4);
|
||||
|
||||
CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2;
|
||||
|
||||
let $q=
|
||||
SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq
|
||||
WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 );
|
||||
|
||||
eval $q;
|
||||
eval explain format=json $q;
|
||||
|
||||
DROP VIEW v2;
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -6213,3 +6213,19 @@ DROP VIEW v;
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13197 Parser refactoring for CREATE VIEW,TRIGGER,SP,UDF,EVENT
|
||||
--echo #
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER VIEW IF NOT EXISTS v1 AS SELECT 1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
@ -1877,3 +1877,53 @@ select count(max(id)) over (order by max(id)) from t1 where id < 3;
|
||||
select max(id), rank() over (order by max(id)) from t1 where id < 3;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # main.win failure post MDEV-12336
|
||||
--echo #
|
||||
create table t(a decimal(35,10), b int);
|
||||
insert into t values (1, 10), (2, 20), (3, 30);
|
||||
|
||||
prepare stmt from "SELECT (CASE WHEN sum(t.a) over (partition by t.b)=1 THEN 1000 ELSE 300 END) AS a FROM t";
|
||||
execute stmt;
|
||||
drop table t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-12851 case with window functions query crashes server
|
||||
--echo #
|
||||
|
||||
create table t1(dt datetime);
|
||||
insert into t1 values ('2017-05-17'), ('2017-05-18');
|
||||
select dt,
|
||||
case when (max(dt) over (order by dt rows between 1 following and 1 following) is null)
|
||||
then '9999-12-31 12:00:00'
|
||||
else max(dt) over (order by dt rows between 1 following and 1 following)
|
||||
end x,
|
||||
case when (max(dt) over (order by dt rows between 1 following and 1 following) is not null)
|
||||
then '9999-12-31 12:00:00'
|
||||
else max(dt) over (order by dt rows between 1 following and 1 following)
|
||||
end x
|
||||
from t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
create table t1(i int);
|
||||
insert into t1 values (null),(1),(2);
|
||||
select max(i) over (order by i),
|
||||
max(i) over (order by i) is null,
|
||||
max(i) over (order by i) is not null
|
||||
from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13240 Wrong warning with MAX(datetime_field) OVER (...)
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (dt DATETIME);
|
||||
INSERT INTO t1 VALUES ('2017-05-17');
|
||||
SELECT MAX(dt) OVER (ORDER BY dt ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
@ -3,7 +3,7 @@ CREATE TABLE t1 (c1 INT, c2 VARCHAR(30));
|
||||
PREPARE populate_table FROM "INSERT into t1 values (1, 'manual_insert_1'),
|
||||
(4, 'manual_insert_2')";
|
||||
|
||||
INSERT INTO t1 SELECT row_number() over(), "should_have_0" FROM t1;
|
||||
INSERT INTO t1 SELECT row_number() over(), "should_have_NULL" FROM t1;
|
||||
INSERT INTO t1 SELECT 1 + row_number() over(), "should_have_2" FROM t1;
|
||||
|
||||
EXECUTE populate_table;
|
||||
|
@ -74,34 +74,6 @@ int (*_my_b_encr_read)(IO_CACHE *info,uchar *Buffer,size_t Count)= 0;
|
||||
int (*_my_b_encr_write)(IO_CACHE *info,const uchar *Buffer,size_t Count)= 0;
|
||||
|
||||
|
||||
/*
|
||||
Setup internal pointers inside IO_CACHE
|
||||
|
||||
SYNOPSIS
|
||||
setup_io_cache()
|
||||
info IO_CACHE handler
|
||||
|
||||
NOTES
|
||||
This is called on automatically on init or reinit of IO_CACHE
|
||||
It must be called externally if one moves or copies an IO_CACHE
|
||||
object.
|
||||
*/
|
||||
|
||||
void setup_io_cache(IO_CACHE* info)
|
||||
{
|
||||
/* Ensure that my_b_tell() and my_b_bytes_in_cache works */
|
||||
if (info->type == WRITE_CACHE)
|
||||
{
|
||||
info->current_pos= &info->write_pos;
|
||||
info->current_end= &info->write_end;
|
||||
}
|
||||
else
|
||||
{
|
||||
info->current_pos= &info->read_pos;
|
||||
info->current_end= &info->read_end;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
init_functions(IO_CACHE* info)
|
||||
@ -148,8 +120,6 @@ init_functions(IO_CACHE* info)
|
||||
DBUG_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
setup_io_cache(info);
|
||||
}
|
||||
|
||||
|
||||
@ -360,12 +330,7 @@ int init_slave_io_cache(IO_CACHE *master, IO_CACHE *slave)
|
||||
memcpy(slave->buffer, master->buffer, master->buffer_length);
|
||||
slave->read_pos= slave->buffer + (master->read_pos - master->buffer);
|
||||
slave->read_end= slave->buffer + (master->read_end - master->buffer);
|
||||
|
||||
DBUG_ASSERT(master->current_pos == &master->read_pos);
|
||||
slave->current_pos= &slave->read_pos;
|
||||
DBUG_ASSERT(master->current_end == &master->read_end);
|
||||
slave->current_end= &slave->read_end;
|
||||
|
||||
|
||||
if (master->next_file_user)
|
||||
{
|
||||
IO_CACHE *p;
|
||||
@ -924,8 +889,6 @@ void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
|
||||
|
||||
read_cache->share= cshare;
|
||||
read_cache->read_function= _my_b_cache_read_r;
|
||||
read_cache->current_pos= NULL;
|
||||
read_cache->current_end= NULL;
|
||||
|
||||
if (write_cache)
|
||||
{
|
||||
|
@ -4011,7 +4011,7 @@ public:
|
||||
field_name_arg);
|
||||
}
|
||||
Field *make_field(TABLE_SHARE *share, MEM_ROOT *mem_root,
|
||||
const LEX_CSTRING *field_name_arg)
|
||||
const LEX_CSTRING *field_name_arg) const
|
||||
{
|
||||
return make_field(share, mem_root, (uchar *) 0, (uchar *) "", 0,
|
||||
field_name_arg);
|
||||
|
@ -1486,8 +1486,6 @@ int merge_many_buff(Sort_param *param, uchar *sort_buffer,
|
||||
if (flush_io_cache(to_file))
|
||||
break; /* purecov: inspected */
|
||||
temp=from_file; from_file=to_file; to_file=temp;
|
||||
setup_io_cache(from_file);
|
||||
setup_io_cache(to_file);
|
||||
*maxbuffer= (uint) (lastbuff-buffpek)-1;
|
||||
}
|
||||
cleanup:
|
||||
@ -1495,7 +1493,6 @@ cleanup:
|
||||
if (to_file == t_file)
|
||||
{
|
||||
*t_file=t_file2; // Copy result file
|
||||
setup_io_cache(t_file);
|
||||
}
|
||||
|
||||
DBUG_RETURN(*maxbuffer >= MERGEBUFF2); /* Return 1 if interrupted */
|
||||
|
@ -2193,6 +2193,9 @@ void Item::split_sum_func2(THD *thd, Ref_ptr_array ref_pointer_array,
|
||||
point to the temporary table.
|
||||
*/
|
||||
split_sum_func(thd, ref_pointer_array, fields, split_flags);
|
||||
if (type() == FUNC_ITEM) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2252,9 +2255,6 @@ void Item::split_sum_func2(THD *thd, Ref_ptr_array ref_pointer_array,
|
||||
&name))))
|
||||
return; // fatal_error is set
|
||||
}
|
||||
else if (type() == FUNC_ITEM &&
|
||||
((Item_func *) this)->with_window_func)
|
||||
return;
|
||||
else
|
||||
{
|
||||
if (!(item_ref= (new (thd->mem_root)
|
||||
|
@ -2313,11 +2313,6 @@ public:
|
||||
Item_func_isnull(THD *thd, Item *a): Item_func_null_predicate(thd, a) {}
|
||||
longlong val_int();
|
||||
enum Functype functype() const { return ISNULL_FUNC; }
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
Item_func_null_predicate::fix_length_and_dec();
|
||||
update_used_tables();
|
||||
}
|
||||
const char *func_name() const { return "isnull"; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
enum precedence precedence() const { return CMP_PRECEDENCE; }
|
||||
|
@ -245,8 +245,9 @@ bool Item_func::check_argument_types_scalar(uint start, uint end) const
|
||||
is to allow all Item_field() objects to setup pointers to the table fields.
|
||||
|
||||
Sets as a side effect the following class variables:
|
||||
maybe_null Set if any argument may return NULL
|
||||
with_sum_func Set if any of the arguments contains a sum function
|
||||
maybe_null Set if any argument may return NULL
|
||||
with_sum_func Set if any of the arguments contains a sum function
|
||||
with_window_func Set if any of the arguments contain a window function
|
||||
with_field Set if any of the arguments contains or is a field
|
||||
used_tables_cache Set to union of the tables used by arguments
|
||||
|
||||
|
@ -38,8 +38,8 @@
|
||||
|
||||
ulonglong Item_sum::ram_limitation(THD *thd)
|
||||
{
|
||||
return MY_MIN(thd->variables.tmp_table_size,
|
||||
thd->variables.max_heap_table_size);
|
||||
return MY_MIN(thd->variables.tmp_memory_table_size,
|
||||
thd->variables.max_heap_table_size);
|
||||
}
|
||||
|
||||
|
||||
|
@ -839,13 +839,24 @@ public:
|
||||
read_value_from_result_field= true;
|
||||
}
|
||||
|
||||
bool is_null()
|
||||
{
|
||||
if (force_return_blank)
|
||||
return true;
|
||||
|
||||
if (read_value_from_result_field)
|
||||
return result_field->is_null();
|
||||
|
||||
return window_func()->is_null();
|
||||
}
|
||||
|
||||
double val_real()
|
||||
{
|
||||
double res;
|
||||
if (force_return_blank)
|
||||
{
|
||||
res= 0.0;
|
||||
null_value= false;
|
||||
null_value= true;
|
||||
}
|
||||
else if (read_value_from_result_field)
|
||||
{
|
||||
@ -866,7 +877,7 @@ public:
|
||||
if (force_return_blank)
|
||||
{
|
||||
res= 0;
|
||||
null_value= false;
|
||||
null_value= true;
|
||||
}
|
||||
else if (read_value_from_result_field)
|
||||
{
|
||||
@ -886,9 +897,8 @@ public:
|
||||
String *res;
|
||||
if (force_return_blank)
|
||||
{
|
||||
null_value= false;
|
||||
str->length(0);
|
||||
res= str;
|
||||
null_value= true;
|
||||
res= NULL;
|
||||
}
|
||||
else if (read_value_from_result_field)
|
||||
{
|
||||
@ -910,9 +920,8 @@ public:
|
||||
my_decimal *res;
|
||||
if (force_return_blank)
|
||||
{
|
||||
my_decimal_set_zero(dec);
|
||||
null_value= false;
|
||||
res= dec;
|
||||
null_value= true;
|
||||
res= NULL;
|
||||
}
|
||||
else if (read_value_from_result_field)
|
||||
{
|
||||
|
@ -4214,13 +4214,13 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd)
|
||||
field->set_table_name(&table->alias);
|
||||
}
|
||||
|
||||
if (thd->variables.tmp_table_size == ~ (ulonglong) 0) // No limit
|
||||
if (thd->variables.tmp_memory_table_size == ~ (ulonglong) 0) // No limit
|
||||
share->max_rows= ~(ha_rows) 0;
|
||||
else
|
||||
share->max_rows= (ha_rows) (((share->db_type() == heap_hton) ?
|
||||
MY_MIN(thd->variables.tmp_table_size,
|
||||
thd->variables.max_heap_table_size) :
|
||||
thd->variables.tmp_table_size) /
|
||||
MY_MIN(thd->variables.tmp_memory_table_size,
|
||||
thd->variables.max_heap_table_size) :
|
||||
thd->variables.tmp_memory_table_size) /
|
||||
share->reclength);
|
||||
set_if_bigger(share->max_rows,1); // For dummy start options
|
||||
|
||||
|
10
sql/sp.cc
10
sql/sp.cc
@ -41,7 +41,7 @@ static int
|
||||
db_load_routine(THD *thd, stored_procedure_type type, const sp_name *name,
|
||||
sp_head **sphp,
|
||||
sql_mode_t sql_mode, const char *params, const char *returns,
|
||||
const char *body, st_sp_chistics &chistics,
|
||||
const char *body, const st_sp_chistics &chistics,
|
||||
LEX_CSTRING *definer_user_name,
|
||||
LEX_CSTRING *definer_host_name,
|
||||
longlong created, longlong modified,
|
||||
@ -813,7 +813,7 @@ static int
|
||||
db_load_routine(THD *thd, stored_procedure_type type,
|
||||
const sp_name *name, sp_head **sphp,
|
||||
sql_mode_t sql_mode, const char *params, const char *returns,
|
||||
const char *body, st_sp_chistics &chistics,
|
||||
const char *body, const st_sp_chistics &chistics,
|
||||
LEX_CSTRING *definer_user_name,
|
||||
LEX_CSTRING *definer_host_name,
|
||||
longlong created, longlong modified,
|
||||
@ -1392,7 +1392,7 @@ sp_drop_routine(THD *thd, stored_procedure_type type, const sp_name *name)
|
||||
|
||||
int
|
||||
sp_update_routine(THD *thd, stored_procedure_type type, const sp_name *name,
|
||||
st_sp_chistics *chistics)
|
||||
const st_sp_chistics *chistics)
|
||||
{
|
||||
TABLE *table;
|
||||
int ret;
|
||||
@ -1793,7 +1793,7 @@ sp_find_routine(THD *thd, stored_procedure_type type, const sp_name *name,
|
||||
if (db_load_routine(thd, type, name, &new_sp,
|
||||
sp->m_sql_mode, sp->m_params.str, returns,
|
||||
sp->m_body.str, *sp->m_chistics,
|
||||
&sp->m_definer_user, &sp->m_definer_host,
|
||||
&sp->m_definer.user, &sp->m_definer.host,
|
||||
sp->m_created, sp->m_modified,
|
||||
sp->get_creation_ctx()) == SP_OK)
|
||||
{
|
||||
@ -2201,7 +2201,7 @@ show_create_sp(THD *thd, String *buf,
|
||||
const char *params, ulong paramslen,
|
||||
const char *returns, ulong returnslen,
|
||||
const char *body, ulong bodylen,
|
||||
st_sp_chistics *chistics,
|
||||
const st_sp_chistics *chistics,
|
||||
const LEX_CSTRING *definer_user,
|
||||
const LEX_CSTRING *definer_host,
|
||||
sql_mode_t sql_mode)
|
||||
|
4
sql/sp.h
4
sql/sp.h
@ -145,7 +145,7 @@ sp_create_routine(THD *thd, stored_procedure_type type, sp_head *sp);
|
||||
|
||||
int
|
||||
sp_update_routine(THD *thd, stored_procedure_type type, const sp_name *name,
|
||||
st_sp_chistics *chistics);
|
||||
const st_sp_chistics *chistics);
|
||||
|
||||
int
|
||||
sp_drop_routine(THD *thd, stored_procedure_type type, const sp_name *name);
|
||||
@ -240,7 +240,7 @@ bool show_create_sp(THD *thd, String *buf,
|
||||
const char *params, ulong paramslen,
|
||||
const char *returns, ulong returnslen,
|
||||
const char *body, ulong bodylen,
|
||||
st_sp_chistics *chistics,
|
||||
const st_sp_chistics *chistics,
|
||||
const LEX_CSTRING *definer_user,
|
||||
const LEX_CSTRING *definer_host,
|
||||
sql_mode_t sql_mode);
|
||||
|
@ -1430,8 +1430,8 @@ set_routine_security_ctx(THD *thd, sp_head *sp, bool is_proc,
|
||||
{
|
||||
*save_ctx= 0;
|
||||
if (sp->m_chistics->suid != SP_IS_NOT_SUID &&
|
||||
sp->m_security_ctx.change_security_context(thd, &sp->m_definer_user,
|
||||
&sp->m_definer_host,
|
||||
sp->m_security_ctx.change_security_context(thd, &sp->m_definer.user,
|
||||
&sp->m_definer.host,
|
||||
&sp->m_db,
|
||||
save_ctx))
|
||||
return TRUE;
|
||||
@ -1543,8 +1543,8 @@ sp_head::execute_trigger(THD *thd,
|
||||
|
||||
if (m_chistics->suid != SP_IS_NOT_SUID &&
|
||||
m_security_ctx.change_security_context(thd,
|
||||
&m_definer_user,
|
||||
&m_definer_host,
|
||||
&m_definer.user,
|
||||
&m_definer.host,
|
||||
&m_db,
|
||||
&save_ctx))
|
||||
DBUG_RETURN(TRUE);
|
||||
@ -2455,7 +2455,7 @@ sp_head::sp_add_instr_cpush_for_cursors(THD *thd, sp_pcontext *pcontext)
|
||||
|
||||
void
|
||||
sp_head::set_info(longlong created, longlong modified,
|
||||
st_sp_chistics *chistics, sql_mode_t sql_mode)
|
||||
const st_sp_chistics *chistics, sql_mode_t sql_mode)
|
||||
{
|
||||
m_created= created;
|
||||
m_modified= modified;
|
||||
@ -2492,17 +2492,6 @@ sp_head::set_definer(const char *definer, uint definerlen)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
sp_head::set_definer(const LEX_CSTRING *user_name, const LEX_CSTRING *host_name)
|
||||
{
|
||||
m_definer_user.str= strmake_root(mem_root, user_name->str, user_name->length);
|
||||
m_definer_user.length= user_name->length;
|
||||
|
||||
m_definer_host.str= strmake_root(mem_root, host_name->str, host_name->length);
|
||||
m_definer_host.length= host_name->length;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
sp_head::reset_thd_mem_root(THD *thd)
|
||||
{
|
||||
@ -2571,9 +2560,9 @@ bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access)
|
||||
*full_access= ((!check_table_access(thd, SELECT_ACL, &tables, FALSE,
|
||||
1, TRUE) &&
|
||||
(tables.grant.privilege & SELECT_ACL) != 0) ||
|
||||
(!strcmp(sp->m_definer_user.str,
|
||||
(!strcmp(sp->m_definer.user.str,
|
||||
thd->security_ctx->priv_user) &&
|
||||
!strcmp(sp->m_definer_host.str,
|
||||
!strcmp(sp->m_definer.host.str,
|
||||
thd->security_ctx->priv_host)));
|
||||
if (!*full_access)
|
||||
return check_some_routine_access(thd, sp->m_db.str, sp->m_name.str,
|
||||
|
@ -187,8 +187,7 @@ public:
|
||||
LEX_CSTRING m_body;
|
||||
LEX_CSTRING m_body_utf8;
|
||||
LEX_CSTRING m_defstr;
|
||||
LEX_CSTRING m_definer_user;
|
||||
LEX_CSTRING m_definer_host;
|
||||
AUTHID m_definer;
|
||||
|
||||
/**
|
||||
Is this routine being executed?
|
||||
@ -673,10 +672,13 @@ public:
|
||||
}
|
||||
|
||||
void set_info(longlong created, longlong modified,
|
||||
st_sp_chistics *chistics, sql_mode_t sql_mode);
|
||||
const st_sp_chistics *chistics, sql_mode_t sql_mode);
|
||||
|
||||
void set_definer(const char *definer, uint definerlen);
|
||||
void set_definer(const LEX_CSTRING *user_name, const LEX_CSTRING *host_name);
|
||||
void set_definer(const LEX_CSTRING *user_name, const LEX_CSTRING *host_name)
|
||||
{
|
||||
m_definer.copy(mem_root, user_name, host_name);
|
||||
}
|
||||
|
||||
void reset_thd_mem_root(THD *thd);
|
||||
|
||||
|
@ -10909,7 +10909,7 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
|
||||
Dummy_error_handler error_handler;
|
||||
DBUG_ENTER("sp_grant_privileges");
|
||||
|
||||
if (!(combo=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
|
||||
if (!(combo=(LEX_USER*) thd->alloc(sizeof(LEX_USER))))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
combo->user.str= sctx->user;
|
||||
|
@ -4806,7 +4806,7 @@ bool open_tables_only_view_structure(THD *thd, TABLE_LIST *table_list,
|
||||
MYSQL_OPEN_GET_NEW_TABLE |
|
||||
(can_deadlock ?
|
||||
MYSQL_OPEN_FAIL_ON_MDL_CONFLICT : 0)),
|
||||
DT_PREPARE | DT_CREATE));
|
||||
DT_INIT | DT_PREPARE | DT_CREATE));
|
||||
/*
|
||||
Restore old value of sql_command back as it is being looked at in
|
||||
process_table() function.
|
||||
|
@ -939,8 +939,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
|
||||
|
||||
m_internal_handler= NULL;
|
||||
m_binlog_invoker= INVOKER_NONE;
|
||||
memset(&invoker_user, 0, sizeof(invoker_user));
|
||||
memset(&invoker_host, 0, sizeof(invoker_host));
|
||||
invoker.init();
|
||||
prepare_derived_at_open= FALSE;
|
||||
create_tmp_table_for_derived= FALSE;
|
||||
save_prep_leaf_list= FALSE;
|
||||
@ -5375,8 +5374,8 @@ void THD::get_definer(LEX_USER *definer, bool role)
|
||||
if (slave_thread && has_invoker())
|
||||
#endif
|
||||
{
|
||||
definer->user= invoker_user;
|
||||
definer->host= invoker_host;
|
||||
definer->user= invoker.user;
|
||||
definer->host= invoker.host;
|
||||
definer->reset_auth();
|
||||
}
|
||||
else
|
||||
@ -7446,4 +7445,16 @@ bool Discrete_intervals_list::append(Discrete_interval *new_interval)
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
void AUTHID::copy(MEM_ROOT *mem_root, const LEX_CSTRING *user_name,
|
||||
const LEX_CSTRING *host_name)
|
||||
{
|
||||
user.str= strmake_root(mem_root, user_name->str, user_name->length);
|
||||
user.length= user_name->length;
|
||||
|
||||
host.str= strmake_root(mem_root, host_name->str, host_name->length);
|
||||
host.length= host_name->length;
|
||||
}
|
||||
|
||||
|
||||
#endif /* !defined(MYSQL_CLIENT) */
|
||||
|
@ -521,7 +521,8 @@ typedef struct system_variables
|
||||
uint dynamic_variables_size; /* how many bytes are in use */
|
||||
|
||||
ulonglong max_heap_table_size;
|
||||
ulonglong tmp_table_size;
|
||||
ulonglong tmp_memory_table_size;
|
||||
ulonglong tmp_disk_table_size;
|
||||
ulonglong long_query_time;
|
||||
ulonglong max_statement_time;
|
||||
ulonglong optimizer_switch;
|
||||
@ -4083,12 +4084,12 @@ public:
|
||||
void get_definer(LEX_USER *definer, bool role);
|
||||
void set_invoker(const LEX_CSTRING *user, const LEX_CSTRING *host)
|
||||
{
|
||||
invoker_user= *user;
|
||||
invoker_host= *host;
|
||||
invoker.user= *user;
|
||||
invoker.host= *host;
|
||||
}
|
||||
LEX_CSTRING get_invoker_user() { return invoker_user; }
|
||||
LEX_CSTRING get_invoker_host() { return invoker_host; }
|
||||
bool has_invoker() { return invoker_user.length > 0; }
|
||||
LEX_CSTRING get_invoker_user() { return invoker.user; }
|
||||
LEX_CSTRING get_invoker_host() { return invoker.host; }
|
||||
bool has_invoker() { return invoker.user.length > 0; }
|
||||
|
||||
void print_aborted_warning(uint threshold, const char *reason)
|
||||
{
|
||||
@ -4187,8 +4188,7 @@ private:
|
||||
TRIGGER or VIEW statements or current user in account management
|
||||
statements if it is not NULL.
|
||||
*/
|
||||
LEX_CSTRING invoker_user;
|
||||
LEX_CSTRING invoker_host;
|
||||
AUTHID invoker;
|
||||
|
||||
public:
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
|
@ -57,7 +57,6 @@ public:
|
||||
|
||||
|
||||
class THD;
|
||||
typedef struct st_lex_user LEX_USER;
|
||||
typedef struct user_conn USER_CONN;
|
||||
|
||||
void init_max_user_conn(void);
|
||||
|
@ -689,6 +689,7 @@ void LEX::start(THD *thd_arg)
|
||||
curr_with_clause= 0;
|
||||
with_clauses_list= 0;
|
||||
with_clauses_list_last_next= &with_clauses_list;
|
||||
create_view= NULL;
|
||||
value_list.empty();
|
||||
update_list.empty();
|
||||
set_var_list.empty();
|
||||
@ -7087,3 +7088,49 @@ bool LEX::sp_add_cfetch(THD *thd, const LEX_CSTRING *name)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool LEX::create_or_alter_view_finalize(THD *thd, Table_ident *table_ident)
|
||||
{
|
||||
sql_command= SQLCOM_CREATE_VIEW;
|
||||
/* first table in list is target VIEW name */
|
||||
if (!select_lex.add_table_to_list(thd, table_ident, NULL,
|
||||
TL_OPTION_UPDATING,
|
||||
TL_IGNORE,
|
||||
MDL_EXCLUSIVE))
|
||||
return true;
|
||||
query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool LEX::add_alter_view(THD *thd, uint16 algorithm,
|
||||
enum_view_suid suid,
|
||||
Table_ident *table_ident)
|
||||
{
|
||||
if (sphead)
|
||||
{
|
||||
my_error(ER_SP_BADSTATEMENT, MYF(0), "ALTER VIEW");
|
||||
return true;
|
||||
}
|
||||
if (!(create_view= new (thd->mem_root)
|
||||
Create_view_info(VIEW_ALTER, algorithm, suid)))
|
||||
return true;
|
||||
return create_or_alter_view_finalize(thd, table_ident);
|
||||
}
|
||||
|
||||
|
||||
bool LEX::add_create_view(THD *thd, DDL_options_st ddl,
|
||||
uint16 algorithm, enum_view_suid suid,
|
||||
Table_ident *table_ident)
|
||||
{
|
||||
if (set_create_options_with_check(ddl))
|
||||
return true;
|
||||
if (!(create_view= new (thd->mem_root)
|
||||
Create_view_info(ddl.or_replace() ?
|
||||
VIEW_CREATE_OR_REPLACE :
|
||||
VIEW_CREATE_NEW,
|
||||
algorithm, suid)))
|
||||
return true;
|
||||
return create_or_alter_view_finalize(thd, table_ident);
|
||||
}
|
||||
|
@ -75,6 +75,14 @@ enum sub_select_type
|
||||
GLOBAL_OPTIONS_TYPE, DERIVED_TABLE_TYPE, OLAP_TYPE
|
||||
};
|
||||
enum unit_common_op {OP_MIX, OP_UNION, OP_INTERSECT, OP_EXCEPT};
|
||||
|
||||
enum enum_view_suid
|
||||
{
|
||||
VIEW_SUID_INVOKER= 0,
|
||||
VIEW_SUID_DEFINER= 1,
|
||||
VIEW_SUID_DEFAULT= 2
|
||||
};
|
||||
|
||||
/* These may not be declared yet */
|
||||
class Table_ident;
|
||||
class sql_exchange;
|
||||
@ -98,7 +106,6 @@ struct sql_digest_state;
|
||||
class With_clause;
|
||||
class my_var;
|
||||
|
||||
|
||||
#define ALLOC_ROOT_SET 1024
|
||||
|
||||
#ifdef MYSQL_SERVER
|
||||
@ -239,6 +246,27 @@ enum enum_view_create_mode
|
||||
VIEW_CREATE_OR_REPLACE // check only that there are not such table
|
||||
};
|
||||
|
||||
|
||||
class Create_view_info: public Sql_alloc
|
||||
{
|
||||
public:
|
||||
LEX_CSTRING select; // The SELECT statement of CREATE VIEW
|
||||
enum enum_view_create_mode mode;
|
||||
uint16 algorithm;
|
||||
uint8 check;
|
||||
enum enum_view_suid suid;
|
||||
Create_view_info(enum_view_create_mode mode_arg,
|
||||
uint16 algorithm_arg,
|
||||
enum_view_suid suid_arg)
|
||||
:select(null_clex_str),
|
||||
mode(mode_arg),
|
||||
algorithm(algorithm_arg),
|
||||
check(VIEW_CHECK_NONE),
|
||||
suid(suid_arg)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
enum enum_drop_mode
|
||||
{
|
||||
DROP_DEFAULT, // mode is not specified
|
||||
@ -2607,6 +2635,8 @@ struct LEX: public Query_tables_list
|
||||
*/
|
||||
With_clause **with_clauses_list_last_next;
|
||||
|
||||
Create_view_info *create_view;
|
||||
|
||||
/* Query Plan Footprint of a currently running select */
|
||||
Explain_query *explain;
|
||||
|
||||
@ -2630,9 +2660,6 @@ struct LEX: public Query_tables_list
|
||||
DYNAMIC_ARRAY plugins;
|
||||
plugin_ref plugins_static_buffer[INITIAL_LEX_PLUGIN_LIST_SIZE];
|
||||
|
||||
/** SELECT of CREATE VIEW statement */
|
||||
LEX_CSTRING create_view_select;
|
||||
|
||||
uint number_of_selects; // valid only for view
|
||||
|
||||
/** Start of 'ON table', in trigger statements. */
|
||||
@ -2759,7 +2786,6 @@ public:
|
||||
bool with_persistent_for_clause; // uses PERSISTENT FOR clause (in ANALYZE)
|
||||
};
|
||||
enum enum_var_type option_type;
|
||||
enum enum_view_create_mode create_view_mode;
|
||||
enum enum_drop_mode drop_mode;
|
||||
|
||||
uint profile_query_id;
|
||||
@ -2785,8 +2811,6 @@ public:
|
||||
DERIVED_SUBQUERY and DERIVED_VIEW).
|
||||
*/
|
||||
uint8 derived_tables;
|
||||
uint16 create_view_algorithm;
|
||||
uint8 create_view_check;
|
||||
uint8 context_analysis_only;
|
||||
bool local_file;
|
||||
bool check_exists;
|
||||
@ -2827,10 +2851,6 @@ public:
|
||||
rexecuton
|
||||
*/
|
||||
bool empty_field_list_on_rset;
|
||||
/*
|
||||
view created to be run from definer (standard behaviour)
|
||||
*/
|
||||
uint8 create_view_suid;
|
||||
/* Characterstics of trigger being created */
|
||||
st_trg_chistics trg_chistics;
|
||||
/*
|
||||
@ -3582,6 +3602,11 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool set_create_options_with_check(DDL_options_st options)
|
||||
{
|
||||
create_info.set(options);
|
||||
return check_create_options(create_info);
|
||||
}
|
||||
bool add_create_options_with_check(DDL_options_st options)
|
||||
{
|
||||
create_info.add(options);
|
||||
@ -3613,6 +3638,12 @@ public:
|
||||
SELECT_LEX *exclude_last_select();
|
||||
bool add_unit_in_brackets(SELECT_LEX *nselect);
|
||||
void check_automatic_up(enum sub_select_type type);
|
||||
bool create_or_alter_view_finalize(THD *thd, Table_ident *table_ident);
|
||||
bool add_alter_view(THD *thd, uint16 algorithm, enum_view_suid suid,
|
||||
Table_ident *table_ident);
|
||||
bool add_create_view(THD *thd, DDL_options_st ddl,
|
||||
uint16 algorithm, enum_view_suid suid,
|
||||
Table_ident *table_ident);
|
||||
};
|
||||
|
||||
|
||||
|
132
sql/sql_parse.cc
132
sql/sql_parse.cc
@ -3034,6 +3034,54 @@ error: /* Used by WSREP_TO_ISOLATION_BEGIN */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Prepare for CREATE DATABASE, ALTER DATABASE, DROP DATABASE.
|
||||
|
||||
@param thd - current THD
|
||||
@param want_access - access needed
|
||||
@param dbname - the database name
|
||||
|
||||
@retval false - Ok to proceed with CREATE/ALTER/DROP
|
||||
@retval true - not OK to proceed (error, or filtered)
|
||||
|
||||
Note, on slave this function returns true if the database
|
||||
is in the ignore filter. The caller must distinguish this case
|
||||
from other cases: bad database error, no access error.
|
||||
This can be done by testing thd->is_error().
|
||||
*/
|
||||
static bool prepare_db_action(THD *thd, ulong want_access, LEX_CSTRING *dbname)
|
||||
{
|
||||
if (check_db_name((LEX_STRING*)dbname))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), dbname->str);
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
If in a slave thread :
|
||||
- CREATE DATABASE DB was certainly not preceded by USE DB.
|
||||
- ALTER DATABASE DB may not be preceded by USE DB.
|
||||
- DROP DATABASE DB may not be preceded by USE DB.
|
||||
For that reason, db_ok() in sql/slave.cc did not check the
|
||||
do_db/ignore_db. And as this query involves no tables, tables_ok()
|
||||
was not called. So we have to check rules again here.
|
||||
*/
|
||||
#ifdef HAVE_REPLICATION
|
||||
if (thd->slave_thread)
|
||||
{
|
||||
Rpl_filter *rpl_filter;
|
||||
rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter;
|
||||
if (!rpl_filter->db_ok(dbname->str) ||
|
||||
!rpl_filter->db_ok_with_wild_table(dbname->str))
|
||||
{
|
||||
my_message(ER_SLAVE_IGNORED_TABLE,
|
||||
ER_THD(thd, ER_SLAVE_IGNORED_TABLE), MYF(0));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return check_access(thd, want_access, dbname->str, NULL, NULL, 1, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
Execute command saved in thd and lex->sql_command.
|
||||
|
||||
@ -5038,33 +5086,9 @@ end_with_restore_list:
|
||||
break;
|
||||
case SQLCOM_CREATE_DB:
|
||||
{
|
||||
if (check_db_name((LEX_STRING*) &lex->name))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), lex->name.str);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
If in a slave thread :
|
||||
CREATE DATABASE DB was certainly not preceded by USE DB.
|
||||
For that reason, db_ok() in sql/slave.cc did not check the
|
||||
do_db/ignore_db. And as this query involves no tables, tables_ok()
|
||||
above was not called. So we have to check rules again here.
|
||||
*/
|
||||
#ifdef HAVE_REPLICATION
|
||||
if (thd->slave_thread)
|
||||
{
|
||||
rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter;
|
||||
if (!rpl_filter->db_ok(lex->name.str) ||
|
||||
!rpl_filter->db_ok_with_wild_table(lex->name.str))
|
||||
{
|
||||
my_message(ER_SLAVE_IGNORED_TABLE, ER_THD(thd, ER_SLAVE_IGNORED_TABLE), MYF(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (check_access(thd, lex->create_info.or_replace() ?
|
||||
if (prepare_db_action(thd, lex->create_info.or_replace() ?
|
||||
(CREATE_ACL | DROP_ACL) : CREATE_ACL,
|
||||
lex->name.str, NULL, NULL, 1, 0))
|
||||
&lex->name))
|
||||
break;
|
||||
WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL)
|
||||
res= mysql_create_db(thd, lex->name.str,
|
||||
@ -5073,31 +5097,7 @@ end_with_restore_list:
|
||||
}
|
||||
case SQLCOM_DROP_DB:
|
||||
{
|
||||
if (check_db_name((LEX_STRING*) &lex->name))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), lex->name.str);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
If in a slave thread :
|
||||
DROP DATABASE DB may not be preceded by USE DB.
|
||||
For that reason, maybe db_ok() in sql/slave.cc did not check the
|
||||
do_db/ignore_db. And as this query involves no tables, tables_ok()
|
||||
above was not called. So we have to check rules again here.
|
||||
*/
|
||||
#ifdef HAVE_REPLICATION
|
||||
if (thd->slave_thread)
|
||||
{
|
||||
rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter;
|
||||
if (!rpl_filter->db_ok(lex->name.str) ||
|
||||
!rpl_filter->db_ok_with_wild_table(lex->name.str))
|
||||
{
|
||||
my_message(ER_SLAVE_IGNORED_TABLE, ER_THD(thd, ER_SLAVE_IGNORED_TABLE), MYF(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (check_access(thd, DROP_ACL, lex->name.str, NULL, NULL, 1, 0))
|
||||
if (prepare_db_action(thd, DROP_ACL, &lex->name))
|
||||
break;
|
||||
WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL)
|
||||
res= mysql_rm_db(thd, lex->name.str, lex->if_exists());
|
||||
@ -5140,31 +5140,7 @@ end_with_restore_list:
|
||||
case SQLCOM_ALTER_DB:
|
||||
{
|
||||
LEX_CSTRING *db= &lex->name;
|
||||
if (check_db_name((LEX_STRING*) db))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), db->str);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
If in a slave thread :
|
||||
ALTER DATABASE DB may not be preceded by USE DB.
|
||||
For that reason, maybe db_ok() in sql/slave.cc did not check the
|
||||
do_db/ignore_db. And as this query involves no tables, tables_ok()
|
||||
above was not called. So we have to check rules again here.
|
||||
*/
|
||||
#ifdef HAVE_REPLICATION
|
||||
if (thd->slave_thread)
|
||||
{
|
||||
rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter;
|
||||
if (!rpl_filter->db_ok(db->str) ||
|
||||
!rpl_filter->db_ok_with_wild_table(db->str))
|
||||
{
|
||||
my_message(ER_SLAVE_IGNORED_TABLE, ER_THD(thd, ER_SLAVE_IGNORED_TABLE), MYF(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (check_access(thd, ALTER_ACL, db->str, NULL, NULL, 1, 0))
|
||||
if (prepare_db_action(thd, ALTER_ACL, db))
|
||||
break;
|
||||
WSREP_TO_ISOLATION_BEGIN(db->str, NULL, NULL)
|
||||
res= mysql_alter_db(thd, db->str, &lex->create_info);
|
||||
@ -6057,10 +6033,10 @@ end_with_restore_list:
|
||||
{
|
||||
/*
|
||||
Note: SQLCOM_CREATE_VIEW also handles 'ALTER VIEW' commands
|
||||
as specified through the thd->lex->create_view_mode flag.
|
||||
as specified through the thd->lex->create_view->mode flag.
|
||||
*/
|
||||
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
|
||||
res= mysql_create_view(thd, first_table, thd->lex->create_view_mode);
|
||||
res= mysql_create_view(thd, first_table, thd->lex->create_view->mode);
|
||||
break;
|
||||
}
|
||||
case SQLCOM_DROP_VIEW:
|
||||
|
@ -1576,7 +1576,7 @@ static int mysql_test_select(Prepared_statement *stmt,
|
||||
}
|
||||
|
||||
if (open_normal_and_derived_tables(thd, tables, MYSQL_OPEN_FORCE_SHARED_MDL,
|
||||
DT_PREPARE | DT_CREATE))
|
||||
DT_INIT | DT_PREPARE | DT_CREATE))
|
||||
goto error;
|
||||
|
||||
thd->lex->used_tables= 0; // Updated by setup_fields
|
||||
@ -2072,7 +2072,7 @@ static bool mysql_test_create_view(Prepared_statement *stmt)
|
||||
TABLE_LIST *view= lex->unlink_first_table(&link_to_local);
|
||||
TABLE_LIST *tables= lex->query_tables;
|
||||
|
||||
if (create_view_precheck(thd, tables, view, lex->create_view_mode))
|
||||
if (create_view_precheck(thd, tables, view, lex->create_view->mode))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
@ -2448,7 +2448,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
|
||||
}
|
||||
break;
|
||||
case SQLCOM_CREATE_VIEW:
|
||||
if (lex->create_view_mode == VIEW_ALTER)
|
||||
if (lex->create_view->mode == VIEW_ALTER)
|
||||
{
|
||||
my_message(ER_UNSUPPORTED_PS, ER_THD(thd, ER_UNSUPPORTED_PS), MYF(0));
|
||||
goto error;
|
||||
|
@ -16681,7 +16681,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
||||
if (blob_count || using_unique_constraint
|
||||
|| (thd->variables.big_tables && !(select_options & SELECT_SMALL_RESULT))
|
||||
|| (select_options & TMP_TABLE_FORCE_MYISAM)
|
||||
|| thd->variables.tmp_table_size == 0)
|
||||
|| thd->variables.tmp_memory_table_size == 0)
|
||||
{
|
||||
share->db_plugin= ha_lock_engine(0, TMP_ENGINE_HTON);
|
||||
table->file= get_new_handler(share, &table->mem_root,
|
||||
@ -16845,14 +16845,14 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
||||
param->recinfo= recinfo; // Pointer to after last field
|
||||
store_record(table,s->default_values); // Make empty default record
|
||||
|
||||
if (thd->variables.tmp_table_size == ~ (ulonglong) 0) // No limit
|
||||
if (thd->variables.tmp_memory_table_size == ~ (ulonglong) 0) // No limit
|
||||
share->max_rows= ~(ha_rows) 0;
|
||||
else
|
||||
share->max_rows= (ha_rows) (((share->db_type() == heap_hton) ?
|
||||
MY_MIN(thd->variables.tmp_table_size,
|
||||
MY_MIN(thd->variables.tmp_memory_table_size,
|
||||
thd->variables.max_heap_table_size) :
|
||||
thd->variables.tmp_table_size) /
|
||||
share->reclength);
|
||||
thd->variables.tmp_memory_table_size) /
|
||||
share->reclength);
|
||||
set_if_bigger(share->max_rows,1); // For dummy start options
|
||||
/*
|
||||
Push the LIMIT clause to the temporary table creation, so that we
|
||||
@ -17390,10 +17390,7 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
|
||||
}
|
||||
}
|
||||
bzero((char*) &create_info,sizeof(create_info));
|
||||
|
||||
/* Use long data format, to ensure we never get a 'table is full' error */
|
||||
if (!(options & SELECT_SMALL_RESULT))
|
||||
create_info.data_file_length= ~(ulonglong) 0;
|
||||
create_info.data_file_length= table->in_use->variables.tmp_disk_table_size;
|
||||
|
||||
/*
|
||||
The logic for choosing the record format:
|
||||
@ -17589,9 +17586,7 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
|
||||
}
|
||||
MI_CREATE_INFO create_info;
|
||||
bzero((char*) &create_info,sizeof(create_info));
|
||||
|
||||
if (!(options & SELECT_SMALL_RESULT))
|
||||
create_info.data_file_length= ~(ulonglong) 0;
|
||||
create_info.data_file_length= table->in_use->variables.tmp_disk_table_size;
|
||||
|
||||
if ((error=mi_create(share->table_name.str, share->keys, &keydef,
|
||||
(uint) (*recinfo-start_recinfo),
|
||||
@ -26307,7 +26302,8 @@ AGGR_OP::put_record(bool end_of_records)
|
||||
{
|
||||
// Lasy tmp table creation/initialization
|
||||
if (!join_tab->table->file->inited)
|
||||
prepare_tmp_table();
|
||||
if (prepare_tmp_table())
|
||||
return NESTED_LOOP_ERROR;
|
||||
enum_nested_loop_state rc= (*write_func)(join_tab->join, join_tab,
|
||||
end_of_records);
|
||||
return rc;
|
||||
|
@ -1166,7 +1166,7 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
|
||||
bool open_error=
|
||||
open_tables(thd, &table_list, &counter,
|
||||
MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL) ||
|
||||
mysql_handle_derived(thd->lex, DT_PREPARE);
|
||||
mysql_handle_derived(thd->lex, DT_INIT | DT_PREPARE);
|
||||
thd->pop_internal_handler();
|
||||
if (open_error && (thd->killed || thd->is_error()))
|
||||
goto exit;
|
||||
@ -1428,7 +1428,7 @@ mysqld_list_fields(THD *thd, TABLE_LIST *table_list, const char *wild)
|
||||
|
||||
if (open_normal_and_derived_tables(thd, table_list,
|
||||
MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL,
|
||||
DT_PREPARE | DT_CREATE))
|
||||
DT_INIT | DT_PREPARE | DT_CREATE))
|
||||
DBUG_VOID_RETURN;
|
||||
table= table_list->table;
|
||||
|
||||
|
@ -1697,8 +1697,8 @@ void Trigger::get_trigger_info(LEX_CSTRING *trigger_stmt,
|
||||
}
|
||||
else
|
||||
{
|
||||
definer->length= strxmov(definer->str, body->m_definer_user.str, "@",
|
||||
body->m_definer_host.str, NullS) - definer->str;
|
||||
definer->length= strxmov(definer->str, body->m_definer.user.str, "@",
|
||||
body->m_definer.host.str, NullS) - definer->str;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user