Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext

This commit is contained in:
Alexander Barkov 2017-07-04 15:31:25 +04:00
commit 5c0df0e4a8
169 changed files with 3383 additions and 4768 deletions

View File

@ -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

View File

@ -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\""

View File

@ -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.

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -1146,9 +1146,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
@ -1499,6 +1507,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

View File

@ -3086,6 +3086,48 @@ 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
#
#

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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=

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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.");

View File

@ -1 +0,0 @@
SET storage_engine=InnoDB;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,18 +0,0 @@
set global innodb_file_per_table=on;
set global innodb_file_format=`1`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View File

@ -1,538 +0,0 @@
SET default_storage_engine=InnoDB;
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.");
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_strict_mode=1;
### Test 1 ###
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
show warnings;
Level Code Message
insert into worklog5743 values(repeat("a", 20000));
update worklog5743 set a = (repeat("b", 16000));
create index idx on worklog5743(a(2000));
show warnings;
Level Code Message
begin;
update worklog5743 set a = (repeat("x", 17000));
select @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
connect con1,localhost,root,,;
select a = repeat("x", 17000) from worklog5743;
a = repeat("x", 17000)
0
select a = repeat("b", 16000) from worklog5743;
a = repeat("b", 16000)
1
connect con2,localhost,root,,;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
select a = repeat("x", 17000) from worklog5743;
a = repeat("x", 17000)
1
connection default;
rollback;
drop table worklog5743;
### Test 2 ###
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
show warnings;
Level Code Message
create index idx on worklog5743(a1, a2(2000));
show warnings;
Level Code Message
insert into worklog5743 values(9, repeat("a", 10000));
begin;
update worklog5743 set a1 = 1000;
connection con1;
select @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743 ref idx idx 5 const 1
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
a1 a2 = repeat("a", 10000)
9 1
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
a1 a2 = repeat("a", 10000)
connection default;
rollback;
drop table worklog5743;
### Test 3 ###
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
create index idx on worklog5743(a1, a2(50));
insert into worklog5743 values(9, repeat("a", 10000));
begin;
update worklog5743 set a1 = 1000;
connection con1;
select @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743 ref idx idx 5 const 1
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
a1 a2 = repeat("a", 10000)
9 1
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
a1 a2 = repeat("a", 10000)
connection default;
rollback;
drop table worklog5743;
### Test 4 ###
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
set sql_mode='';
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_1(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_1(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_1(a2(436));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. 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 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx4 on worklog5743_1(a2(434));
show warnings;
Level Code Message
create index idx5 on worklog5743_1(a1, a2(430));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. 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 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_2(a2(4000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_2(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_2(a2(948));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. 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 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx4 on worklog5743_2(a2(946));
show warnings;
Level Code Message
create index idx5 on worklog5743_2(a1, a2(942));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. 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 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_4(a2(4000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_4(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_4(a2(1972));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. 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 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx4 on worklog5743_4(a2(1970));
show warnings;
Level Code Message
create index idx5 on worklog5743_4(a1, a2(1966));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. 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 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx6 on worklog5743_4(a1, a2(1964));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_8(a2(1000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_8(a2(3073));
Warnings:
Note 1071 Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_8(a2(3072));
Warnings:
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
show warnings;
Level Code Message
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
create index idx4 on worklog5743_8(a1, a2(3069));
ERROR 42000: Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx5 on worklog5743_8(a1, a2(3068));
show warnings;
Level Code Message
create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
ERROR 42000: Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_16(a2(1000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_16(a2(3073));
Warnings:
Note 1071 Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_16(a2(3072));
Warnings:
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
show warnings;
Level Code Message
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
create index idx4 on worklog5743_16(a1, a2(3069));
ERROR 42000: Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx5 on worklog5743_16(a1, a2(3068));
show warnings;
Level Code Message
create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
ERROR 42000: Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
show warnings;
Level Code Message
set sql_mode=default;
insert into worklog5743_1 values(9, repeat("a", 10000));
insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
insert into worklog5743_1 values(2, repeat("b", 10000));
insert into worklog5743_2 values(2, repeat("b", 10000));
insert into worklog5743_4 values(2, repeat("b", 10000));
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select a1, left(a2, 20) from worklog5743_1;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_2;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_4;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_8;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_16;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
begin;
update worklog5743_1 set a1 = 1000;
update worklog5743_2 set a1 = 1000;
update worklog5743_4 set a1 = 1000;
update worklog5743_8 set a1 = 1000;
update worklog5743_16 set a1 = 1000;
select a1, left(a2, 20) from worklog5743_1;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_2;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_4;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_8;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_16;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
connection con1;
select @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743_8 ref idx5,idx7 idx5 5 const 1
explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743_16 ref idx5,idx7 idx5 5 const 1
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
a1 left(a2, 20)
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
a1 left(a2, 20)
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
a1 left(a2, 20)
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
a1 left(a2, 20)
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
a1 left(a2, 20)
connection default;
rollback;
drop table worklog5743_1;
drop table worklog5743_2;
drop table worklog5743_4;
drop table worklog5743_8;
drop table worklog5743_16;
### Test 5 ###
create table worklog5743(a1 int,
a2 varchar(20000),
a3 varchar(3073),
a4 varchar(3072),
a5 varchar(3069),
a6 varchar(3068))
ROW_FORMAT=DYNAMIC;
set sql_mode='';
create index idx1 on worklog5743(a2);
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
create index idx2 on worklog5743(a3);
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743(a4);
show warnings;
Level Code Message
create index idx4 on worklog5743(a1, a2);
ERROR 42000: Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 3072 bytes
Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx5 on worklog5743(a1, a5);
ERROR 42000: Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx6 on worklog5743(a1, a6);
show warnings;
Level Code Message
show create table worklog5743;
Table Create Table
worklog5743 CREATE TABLE `worklog5743` (
`a1` int(11) DEFAULT NULL,
`a2` varchar(20000) DEFAULT NULL,
`a3` varchar(3073) DEFAULT NULL,
`a4` varchar(3072) DEFAULT NULL,
`a5` varchar(3069) DEFAULT NULL,
`a6` varchar(3068) DEFAULT NULL,
KEY `idx1` (`a2`(3072)),
KEY `idx2` (`a3`(3072)),
KEY `idx3` (`a4`),
KEY `idx6` (`a1`,`a6`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
set sql_mode=default;
insert into worklog5743 values(9,
repeat("a", 20000), repeat("a", 3073),
repeat("a", 3072), repeat("a", 3069),
repeat("a", 3068));
begin;
update worklog5743 set a1 = 1000;
connection con1;
select @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
explain select a1 from worklog5743 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743 ref idx6 idx6 5 const 1 Using index
select a1 from worklog5743 where a1 = 9;
a1
9
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
select a1 from worklog5743 where a1 = 9;
a1
connection default;
rollback;
drop table worklog5743;
### Test 6 ###
create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
create table worklog5743(a TEXT) row_format=COMPACT;
create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
create index idx on worklog5743(a(767));
insert into worklog5743 values(repeat("a", 20000));
begin;
insert into worklog5743 values(repeat("b", 20000));
update worklog5743 set a = (repeat("x", 25000));
select @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
connection con1;
select a = repeat("a", 20000) from worklog5743;
a = repeat("a", 20000)
1
disconnect con1;
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
select a = repeat("x", 25000) from worklog5743;
a = repeat("x", 25000)
1
1
disconnect con2;
connection default;
rollback;
drop table worklog5743;
### Test 7 ###
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
set statement sql_mode = '' for
create index idx1 on worklog5743(a(3073));
Warnings:
Note 1071 Specified key was too long; max key length is 3072 bytes
create index idx2 on worklog5743(a(3072));
Warnings:
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
show create table worklog5743;
Table Create Table
worklog5743 CREATE TABLE `worklog5743` (
`a` text NOT NULL,
KEY `idx1` (`a`(3072)),
KEY `idx2` (`a`(3072))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
drop table worklog5743;
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
create index idx2 on worklog5743(a(767));
drop table worklog5743;
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
create index idx2 on worklog5743(a(767));
drop table worklog5743;
SET GLOBAL innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_strict_mode = DEFAULT;

View File

@ -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;

View File

@ -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;

View File

@ -1 +0,0 @@
--innodb_large_prefix=ON

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1 +0,0 @@
--innodb-buffer-pool-size=8M

View File

@ -1,63 +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 $format=`select @@innodb_file_format`;
-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
set global innodb_file_per_table=on;
set global innodb_file_format=`1`;
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_format=$format;
eval set global innodb_file_per_table=$per_table;

View File

@ -1,434 +0,0 @@
# Testcase for worklog #5743: Lift the limit of index key prefixes
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
SET default_storage_engine=InnoDB;
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.");
let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
set global innodb_large_prefix=1;
set global innodb_strict_mode=1;
-- echo ### Test 1 ###
# Create a table of DYNAMIC format, with a primary index of 1000 bytes in
# size
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
show warnings;
# Do some insertion and update to excercise the external cache
# code path
insert into worklog5743 values(repeat("a", 20000));
# default session, update the table
update worklog5743 set a = (repeat("b", 16000));
# Create a secondary index
create index idx on worklog5743(a(2000));
show warnings;
# Start a few sessions to do selections on table being updated in default
# session, so it would rebuild the previous version from undo log.
# 1) Default session: Initiate an update on the externally stored column
# 2) Session con1: Select from table with repeated read
# 3) Session con2: Select from table with read uncommitted
# 4) Default session: rollback updates
begin;
update worklog5743 set a = (repeat("x", 17000));
# Start a new session to select the column to force it build
# an earlier version of the clustered index through undo log. So it should
# just see the result of repeat("b", 16000)
select @@session.tx_isolation;
--connect (con1,localhost,root,,)
select a = repeat("x", 17000) from worklog5743;
select a = repeat("b", 16000) from worklog5743;
# Start another session doing "read uncommitted" query, it
# should see the uncommitted update
--connect (con2,localhost,root,,)
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
select a = repeat("x", 17000) from worklog5743;
# Roll back the transaction
--connection default
rollback;
drop table worklog5743;
-- echo ### Test 2 ###
# Create a table with only a secondary index has large prefix column
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
show warnings;
create index idx on worklog5743(a1, a2(2000));
show warnings;
insert into worklog5743 values(9, repeat("a", 10000));
begin;
update worklog5743 set a1 = 1000;
# Do a select from another connection that would use the secondary index
--connection con1
select @@session.tx_isolation;
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
# Do read uncommitted in another session, it would show there is no
# row with a1 = 9
--connection con2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
--connection default
rollback;
drop table worklog5743;
-- echo ### Test 3 ###
# Create a table with a secondary index has small (50 bytes) prefix column
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
create index idx on worklog5743(a1, a2(50));
insert into worklog5743 values(9, repeat("a", 10000));
begin;
update worklog5743 set a1 = 1000;
# Do a select from another connection that would use the secondary index
--connection con1
select @@session.tx_isolation;
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
# Do read uncommitted in another session, it would show there is no
# row with a1 = 9
--connection con2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
--connection default
rollback;
drop table worklog5743;
-- echo ### Test 4 ###
# Create compressed tables with each KEY_BLOCK_SIZE.
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
# The maximum overall index record (not prefix) length of a
# compressed table is dependent on innodb-page-size (IPS),
# key_block_size (KBS) and the number of fields (NF).
# "Too big row" error (HA_ERR_TO_BIG_ROW) will be returned if this
# limit is exceeded.
# See page_zip_empty_size() and Bug #47495 for more detail.
# Test edge cases for indexes using key_block_size=1
set sql_mode='';
set global innodb_large_prefix=0;
-- error ER_TOO_BIG_ROWSIZE
create index idx1 on worklog5743_1(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_BIG_ROWSIZE
create index idx2 on worklog5743_1(a2(4000));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx3 on worklog5743_1(a2(436));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx4 on worklog5743_1(a2(434));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx5 on worklog5743_1(a1, a2(430));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
# Test edge cases for indexes using key_block_size=2
set global innodb_large_prefix=0;
create index idx1 on worklog5743_2(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_BIG_ROWSIZE
create index idx2 on worklog5743_2(a2(4000));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx3 on worklog5743_2(a2(948));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx4 on worklog5743_2(a2(946));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx5 on worklog5743_2(a1, a2(942));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
# Test edge cases for indexes using key_block_size=4
set global innodb_large_prefix=0;
create index idx1 on worklog5743_4(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_BIG_ROWSIZE
create index idx2 on worklog5743_4(a2(4000));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx3 on worklog5743_4(a2(1972));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx4 on worklog5743_4(a2(1970));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx5 on worklog5743_4(a1, a2(1966));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx6 on worklog5743_4(a1, a2(1964));
show warnings;
# Test edge cases for indexes using key_block_size=8
set global innodb_large_prefix=0;
create index idx1 on worklog5743_8(a2(1000));
show warnings;
set global innodb_large_prefix=1;
create index idx2 on worklog5743_8(a2(3073));
show warnings;
create index idx3 on worklog5743_8(a2(3072));
show warnings;
-- error ER_TOO_LONG_KEY
create index idx4 on worklog5743_8(a1, a2(3069));
show warnings;
create index idx5 on worklog5743_8(a1, a2(3068));
show warnings;
-- error ER_TOO_LONG_KEY
create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
show warnings;
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
show warnings;
# Test edge cases for indexes using key_block_size=16
set global innodb_large_prefix=0;
create index idx1 on worklog5743_16(a2(1000));
show warnings;
set global innodb_large_prefix=1;
create index idx2 on worklog5743_16(a2(3073));
show warnings;
create index idx3 on worklog5743_16(a2(3072));
show warnings;
-- error ER_TOO_LONG_KEY
create index idx4 on worklog5743_16(a1, a2(3069));
show warnings;
create index idx5 on worklog5743_16(a1, a2(3068));
show warnings;
-- error ER_TOO_LONG_KEY
create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
show warnings;
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
show warnings;
set sql_mode=default;
# Insert a large record into each of these tables.
insert into worklog5743_1 values(9, repeat("a", 10000));
insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
# Now if we change the global innodb_large_prefix back to 767,
# updates to these indexes should still be allowed.
set global innodb_large_prefix=0;
insert into worklog5743_1 values(2, repeat("b", 10000));
insert into worklog5743_2 values(2, repeat("b", 10000));
insert into worklog5743_4 values(2, repeat("b", 10000));
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
set global innodb_large_prefix=1;
select a1, left(a2, 20) from worklog5743_1;
select a1, left(a2, 20) from worklog5743_2;
select a1, left(a2, 20) from worklog5743_4;
select a1, left(a2, 20) from worklog5743_8;
select a1, left(a2, 20) from worklog5743_16;
begin;
update worklog5743_1 set a1 = 1000;
update worklog5743_2 set a1 = 1000;
update worklog5743_4 set a1 = 1000;
update worklog5743_8 set a1 = 1000;
update worklog5743_16 set a1 = 1000;
select a1, left(a2, 20) from worklog5743_1;
select a1, left(a2, 20) from worklog5743_2;
select a1, left(a2, 20) from worklog5743_4;
select a1, left(a2, 20) from worklog5743_8;
select a1, left(a2, 20) from worklog5743_16;
# Do a select from another connection that would use the secondary index
--connection con1
select @@session.tx_isolation;
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
# Do read uncommitted in another session, it would show there is no
# row with a1 = 9
--connection con2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
--connection default
rollback;
drop table worklog5743_1;
drop table worklog5743_2;
drop table worklog5743_4;
drop table worklog5743_8;
drop table worklog5743_16;
-- echo ### Test 5 ###
# Create a table with large varchar columns and create indexes
# directly on these large columns to show that prefix limit is
# automatically applied and to show that limit.
create table worklog5743(a1 int,
a2 varchar(20000),
a3 varchar(3073),
a4 varchar(3072),
a5 varchar(3069),
a6 varchar(3068))
ROW_FORMAT=DYNAMIC;
set sql_mode='';
create index idx1 on worklog5743(a2);
create index idx2 on worklog5743(a3);
create index idx3 on worklog5743(a4);
show warnings;
-- error ER_TOO_LONG_KEY
create index idx4 on worklog5743(a1, a2);
show warnings;
-- error ER_TOO_LONG_KEY
create index idx5 on worklog5743(a1, a5);
show warnings;
create index idx6 on worklog5743(a1, a6);
show warnings;
show create table worklog5743;
set sql_mode=default;
insert into worklog5743 values(9,
repeat("a", 20000), repeat("a", 3073),
repeat("a", 3072), repeat("a", 3069),
repeat("a", 3068));
begin;
update worklog5743 set a1 = 1000;
# Do a select from another connection that would use the secondary index
--connection con1
select @@session.tx_isolation;
explain select a1 from worklog5743 where a1 = 9;
select a1 from worklog5743 where a1 = 9;
# Do read uncommitted, it would show there is no row with a1 = 9
--connection con2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
select a1 from worklog5743 where a1 = 9;
--connection default
rollback;
drop table worklog5743;
-- echo ### Test 6 ###
# Create a table with old format, and the limit is 768 bytes.
-- error ER_INDEX_COLUMN_TOO_LONG
create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
create table worklog5743(a TEXT) row_format=COMPACT;
# Excercise the column length check in ha_innobase::add_index()
-- error ER_INDEX_COLUMN_TOO_LONG
create index idx on worklog5743(a(768));
# This should be successful
create index idx on worklog5743(a(767));
# Perform some DMLs
insert into worklog5743 values(repeat("a", 20000));
begin;
insert into worklog5743 values(repeat("b", 20000));
update worklog5743 set a = (repeat("x", 25000));
# Start a new session to select the table to force it build
# an earlier version of the cluster index through undo log
select @@session.tx_isolation;
--connection con1
select a = repeat("a", 20000) from worklog5743;
--disconnect con1
--connection con2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
select a = repeat("x", 25000) from worklog5743;
--disconnect con2
--connection default
rollback;
drop table worklog5743;
-- echo ### Test 7 ###
# Some border line tests on the column length.
# We have a limit of 3072 bytes for Barracuda table
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
# Length exceeds maximum supported key length
# It will be auto-truncated to 3072
set statement sql_mode = '' for
create index idx1 on worklog5743(a(3073));
create index idx2 on worklog5743(a(3072));
show create table worklog5743;
drop table worklog5743;
# We have a limit of 767 bytes for Antelope tables
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
-- error ER_INDEX_COLUMN_TOO_LONG
create index idx on worklog5743(a(768));
create index idx2 on worklog5743(a(767));
drop table worklog5743;
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
-- error ER_INDEX_COLUMN_TOO_LONG
create index idx on worklog5743(a(768));
create index idx2 on worklog5743(a(767));
drop table worklog5743;
eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
SET GLOBAL innodb_strict_mode = DEFAULT;

View File

@ -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

View File

@ -1776,11 +1776,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

View File

@ -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

View File

@ -4951,6 +4951,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
@ -4958,7 +4986,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

View 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;

View 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;

View 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;

View 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 #
###################################################

View 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;

View 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 #
###################################################

View File

@ -1,4 +1,4 @@
--source include/have_wsrep.inc
--source include/have_wsrep_enabled.inc
--source include/have_binlog_format_row.inc
--echo

View File

@ -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;

View File

@ -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;

View File

@ -1878,6 +1878,43 @@ 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 #

View File

@ -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)
{

View File

@ -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 */

View File

@ -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)

View File

@ -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; }

View File

@ -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
@ -3649,7 +3650,7 @@ longlong Item_master_gtid_wait::val_int()
{
DBUG_ASSERT(fixed == 1);
longlong result= 0;
String *gtid_pos = args[0]->val_str(&value);
String *gtid_pos __attribute__((unused)) = args[0]->val_str(&value);
if (args[0]->null_value)
{

View File

@ -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);
}

View File

@ -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

View File

@ -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.

View File

@ -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;

View File

@ -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

View File

@ -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),
@ -26303,7 +26298,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;

View File

@ -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;

View File

@ -3421,12 +3421,30 @@ static Sys_var_tx_read_only Sys_tx_read_only(
static Sys_var_ulonglong Sys_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",
SESSION_VAR(tmp_table_size), CMD_LINE(REQUIRED_ARG),
"will automatically convert it to an on-disk MyISAM or Aria table.",
SESSION_VAR(tmp_memory_table_size), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1024, (ulonglong)~(intptr)0), DEFAULT(16*1024*1024),
BLOCK_SIZE(1));
static Sys_var_ulonglong Sys_tmp_memory_table_size(
"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. "
"Same as tmp_table_size.",
SESSION_VAR(tmp_memory_table_size), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1024, (ulonglong)~(intptr)0), DEFAULT(16*1024*1024),
BLOCK_SIZE(1));
static Sys_var_ulonglong Sys_tmp_disk_table_size(
"tmp_disk_table_size",
"Max size for data for an internal temporary on-disk MyISAM or Aria table.",
SESSION_VAR(tmp_disk_table_size), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1024, (ulonglong)~(intptr)0),
DEFAULT((ulonglong)~(intptr)0),
BLOCK_SIZE(1));
static Sys_var_mybool Sys_timed_mutexes(
"timed_mutexes",
"Specify whether to time mutexes. Deprecated, has no effect.",

View File

@ -8249,8 +8249,12 @@ Item* TABLE_LIST::build_pushable_cond_for_table(THD *thd, Item *cond)
Item *left_item_clone= left_item->build_clone(thd, thd->mem_root);
Item *right_item_clone= item->build_clone(thd, thd->mem_root);
if (left_item_clone && right_item_clone)
{
left_item_clone->set_item_equal(NULL);
right_item_clone->set_item_equal(NULL);
eq= new (thd->mem_root) Item_func_eq(thd, right_item_clone,
left_item_clone);
}
if (eq)
{
i++;

View File

@ -322,16 +322,6 @@ bool THD::open_temporary_table(TABLE_LIST *tl)
TMP_TABLE_SHARE *share;
TABLE *table= NULL;
/*
Since temporary tables are not safe for parallel replication, lets
wait for the prior commits in case the table is found to be in use.
*/
if (rgi_slave &&
rgi_slave->is_parallel_exec &&
find_temporary_table(tl) &&
wait_for_prior_commit())
DBUG_RETURN(true);
/*
Code in open_table() assumes that TABLE_LIST::table can be non-zero only
for pre-opened temporary tables.
@ -352,6 +342,22 @@ bool THD::open_temporary_table(TABLE_LIST *tl)
DBUG_RETURN(false);
}
/*
Temporary tables are not safe for parallel replication. They were
designed to be visible to one thread only, so have no table locking.
Thus there is no protection against two conflicting transactions
committing in parallel and things like that.
So for now, anything that uses temporary tables will be serialised
with anything before it, when using parallel replication.
*/
if (rgi_slave &&
rgi_slave->is_parallel_exec &&
find_temporary_table(tl) &&
wait_for_prior_commit())
DBUG_RETURN(true);
/*
First check if there is a reusable open table available in the
open table list.
@ -380,26 +386,6 @@ bool THD::open_temporary_table(TABLE_LIST *tl)
DBUG_RETURN(false);
}
/*
Temporary tables are not safe for parallel replication. They were
designed to be visible to one thread only, so have no table locking.
Thus there is no protection against two conflicting transactions
committing in parallel and things like that.
So for now, anything that uses temporary tables will be serialised
with anything before it, when using parallel replication.
TODO: We might be able to introduce a reference count or something
on temp tables, and have slave worker threads wait for it to reach
zero before being allowed to use the temp table. Might not be worth
it though, as statement-based replication using temporary tables is
in any case rather fragile.
*/
if (rgi_slave &&
rgi_slave->is_parallel_exec &&
wait_for_prior_commit())
DBUG_RETURN(true);
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (tl->partition_names)
{

View File

@ -529,7 +529,7 @@ YY_DECL
pp->Num = 0;
if (pp->InFmt) {*pp->InFmt = '\0'; pp->InFmt[pp->Outsize -1] = '\0'; }
if (pp->OutFmt) {*pp->OutFmt = '\0'; pp->OutFmt[pp->Outsize -1] = '\0'; }
pp->Curp = pp->Format;
pp->Curp = (char*) pp->Format;
yy_init = 1; /* This is a new input */

View File

@ -124,7 +124,7 @@ bool MYSQLDEF::GetServerInfo(PGLOBAL g, const char *server_name)
DBUG_RETURN(true);
} // endif server
DBUG_PRINT("info", ("get_server_by_name returned server at %lx",
DBUG_PRINT("info", ("get_server_by_name returned server at %zx",
(size_t) server));
// TODO: We need to examine which of these can really be NULL

View File

@ -4673,29 +4673,12 @@ btr_index_rec_validate(
rec_get_nth_field_offs(offsets, i, &len);
/* Note that if fixed_size != 0, it equals the
length of a fixed-size column in the clustered index,
except the DATA_POINT, whose length would be MBR_LEN
when it's indexed in a R-TREE. We should adjust it here.
length of a fixed-size column in the clustered index.
We should adjust it here.
A prefix index of the column is of fixed, but different
length. When fixed_size == 0, prefix_len is the maximum
length of the prefix index column. */
if (dict_field_get_col(field)->mtype == DATA_POINT) {
ut_ad(fixed_size == DATA_POINT_LEN);
if (dict_index_is_spatial(index)) {
/* For DATA_POINT data, when it has R-tree
index, the fixed_len is the MBR of the point.
But if it's a primary key and on R-TREE
as the PK pointer, the length shall be
DATA_POINT_LEN as well. */
ut_ad((field->fixed_len == DATA_MBR_LEN
&& i == 0)
|| (field->fixed_len == DATA_POINT_LEN
&& i != 0));
fixed_size = field->fixed_len;
}
}
if ((field->prefix_len == 0
&& len != UNIV_SQL_NULL && fixed_size
&& len != fixed_size)

View File

@ -3679,6 +3679,11 @@ btr_cur_update_in_place(
was_delete_marked = rec_get_deleted_flag(
rec, page_is_comp(buf_block_get_frame(block)));
/* In delete-marked records, DB_TRX_ID must always refer to an
existing undo log record. */
ut_ad(!was_delete_marked
|| !dict_index_is_clust(index)
|| row_get_rec_trx_id(rec, index, offsets));
#ifdef BTR_CUR_HASH_ADAPT
if (block->index) {
@ -4321,6 +4326,10 @@ btr_cur_pessimistic_update(
stored fields */
btr_cur_unmark_extern_fields(
page_zip, rec, index, *offsets, mtr);
} else {
/* In delete-marked records, DB_TRX_ID must
always refer to an existing undo log record. */
ut_ad(row_get_rec_trx_id(rec, index, *offsets));
}
bool adjust = big_rec_vec && (flags & BTR_KEEP_POS_FLAG);
@ -4448,6 +4457,10 @@ btr_cur_pessimistic_update(
btr_cur_unmark_extern_fields(page_zip,
rec, index, *offsets, mtr);
} else {
/* In delete-marked records, DB_TRX_ID must
always refer to an existing undo log record. */
ut_ad(row_get_rec_trx_id(rec, index, *offsets));
}
if (!dict_table_is_locking_disabled(index->table)) {
@ -4573,6 +4586,10 @@ btr_cur_parse_del_mark_set_clust_rec(
ut_a(offset <= UNIV_PAGE_SIZE);
/* In delete-marked records, DB_TRX_ID must
always refer to an existing undo log record. */
ut_ad(trx_id || (flags & BTR_KEEP_SYS_FLAG));
if (page) {
rec = page + offset;
@ -4582,20 +4599,37 @@ btr_cur_parse_del_mark_set_clust_rec(
and the adaptive hash index does not depend on them. */
btr_rec_set_deleted_flag(rec, page_zip, val);
/* pos is the offset of DB_TRX_ID in the clustered index.
Debug assertions may also access DB_ROLL_PTR at pos+1.
Therefore, we must compute offsets for the first pos+2
clustered index fields. */
ut_ad(pos <= MAX_REF_PARTS);
ulint offsets[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
rec_offs_init(offsets);
mem_heap_t* heap = NULL;
if (!(flags & BTR_KEEP_SYS_FLAG)) {
mem_heap_t* heap = NULL;
ulint offsets_[REC_OFFS_NORMAL_SIZE];
rec_offs_init(offsets_);
row_upd_rec_sys_fields_in_recovery(
rec, page_zip,
rec_get_offsets(rec, index, offsets_,
ULINT_UNDEFINED, &heap),
rec_get_offsets(rec, index, offsets,
pos + 2, &heap),
pos, trx_id, roll_ptr);
if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
}
} else {
/* In delete-marked records, DB_TRX_ID must
always refer to an existing undo log record. */
ut_ad(memcmp(rec_get_nth_field(
rec,
rec_get_offsets(rec, index,
offsets, pos,
&heap),
pos, &offset),
field_ref_zero, DATA_TRX_ID_LEN));
ut_ad(offset == DATA_TRX_ID_LEN);
}
if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
}
}
@ -4633,8 +4667,10 @@ btr_cur_del_mark_set_clust_rec(
ut_ad(mtr->is_named_space(index->space));
if (rec_get_deleted_flag(rec, rec_offs_comp(offsets))) {
/* While cascading delete operations, this becomes possible. */
ut_ad(rec_get_trx_id(rec, index) == thr_get_trx(thr)->id);
/* We may already have delete-marked this record
when executing an ON DELETE CASCADE operation. */
ut_ad(row_get_rec_trx_id(rec, index, offsets)
== thr_get_trx(thr)->id);
return(DB_SUCCESS);
}
@ -4663,10 +4699,6 @@ btr_cur_del_mark_set_clust_rec(
btr_rec_set_deleted_flag(rec, page_zip, TRUE);
trx = thr_get_trx(thr);
/* This function must not be invoked during rollback
(of a TRX_STATE_PREPARE transaction or otherwise). */
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
ut_ad(!trx->in_rollback);
DBUG_LOG("ib_cur",
"delete-mark clust " << index->table->name

View File

@ -5959,9 +5959,8 @@ database_corrupted:
error injection */
DBUG_EXECUTE_IF(
"buf_page_import_corrupt_failure",
if (bpage->id.space()
> srv_undo_tablespaces_open
&& bpage->id.space() != SRV_TMP_SPACE_ID) {
if (!is_predefined_tablespace(
bpage->id.space())) {
buf_mark_space_corrupt(bpage);
ib::info() << "Simulated IMPORT "
"corruption";
@ -6027,8 +6026,7 @@ database_corrupted:
if (uncompressed
&& !recv_no_ibuf_operations
&& (bpage->id.space() == 0
|| (bpage->id.space() > srv_undo_tablespaces_open
&& bpage->id.space() != SRV_TMP_SPACE_ID))
|| !is_predefined_tablespace(bpage->id.space()))
&& !srv_is_tablespace_truncated(bpage->id.space())
&& fil_page_get_type(frame) == FIL_PAGE_INDEX
&& page_is_leaf(frame)) {

View File

@ -813,23 +813,26 @@ buf_read_ibuf_merge_pages(
#endif
for (ulint i = 0; i < n_stored; i++) {
const page_id_t page_id(space_ids[i], page_nos[i]);
buf_pool_t* buf_pool = buf_pool_get(page_id);
bool found;
const page_size_t page_size(fil_space_get_page_size(
space_ids[i], &found));
if (!found) {
tablespace_deleted:
/* The tablespace was not found, remove the
entries for that page */
ibuf_merge_or_delete_for_page(NULL, page_id,
NULL, FALSE);
/* The tablespace was not found: remove all
entries for it */
ibuf_delete_for_discarded_space(space_ids[i]);
while (i + 1 < n_stored
&& space_ids[i + 1] == space_ids[i]) {
i++;
}
continue;
}
const page_id_t page_id(space_ids[i], page_nos[i]);
buf_pool_t* buf_pool = buf_pool_get(page_id);
while (buf_pool->n_pend_reads
> buf_pool->curr_size / BUF_READ_AHEAD_PEND_LIMIT) {
os_thread_sleep(500000);

View File

@ -193,14 +193,6 @@ dtype_print(const dtype_t* type)
fputs("DATA_BLOB", stderr);
break;
case DATA_POINT:
fputs("DATA_POINT", stderr);
break;
case DATA_VAR_POINT:
fputs("DATA_VAR_POINT", stderr);
break;
case DATA_GEOMETRY:
fputs("DATA_GEOMETRY", stderr);
break;

View File

@ -2892,22 +2892,9 @@ dict_index_add_col(
field = dict_index_get_nth_field(index, index->n_def - 1);
field->col = col;
/* DATA_POINT is a special type, whose fixed_len should be:
1) DATA_MBR_LEN, when it's indexed in R-TREE. In this case,
it must be the first col to be added.
2) DATA_POINT_LEN(be equal to fixed size of column), when it's
indexed in B-TREE,
3) DATA_POINT_LEN, if a POINT col is the PRIMARY KEY, and we are
adding the PK col to other B-TREE/R-TREE. */
/* TODO: We suppose the dimension is 2 now. */
if (dict_index_is_spatial(index) && DATA_POINT_MTYPE(col->mtype)
&& index->n_def == 1) {
field->fixed_len = DATA_MBR_LEN;
} else {
field->fixed_len = static_cast<unsigned int>(
dict_col_get_fixed_size(
col, dict_table_is_comp(table)));
}
field->fixed_len = static_cast<unsigned int>(
dict_col_get_fixed_size(
col, dict_table_is_comp(table)));
if (prefix_len && field->fixed_len > prefix_len) {
field->fixed_len = (unsigned int) prefix_len;

View File

@ -39,11 +39,8 @@ bool
Tablespace::intersection(
const Tablespace* other_space)
{
files_t::const_iterator end = other_space->m_files.end();
for (files_t::const_iterator it = other_space->m_files.begin();
it != end;
++it) {
for (files_t::const_iterator it(other_space->begin()),
end(other_space->end()); it != end; ++it) {
if (find(it->m_filename)) {
@ -58,14 +55,13 @@ Tablespace::intersection(
void
Tablespace::shutdown()
{
files_t::iterator end = m_files.end();
for (files_t::iterator it = m_files.begin(); it != end; ++it) {
for (iterator it = begin(); it != end(); ++it) {
it->shutdown();
}
m_files.clear();
ut_free(m_path);
m_path = NULL;
m_space_id = ULINT_UNDEFINED;
}
@ -94,10 +90,7 @@ Tablespace::open_or_create(bool is_temp)
ut_ad(!m_files.empty());
files_t::iterator begin = m_files.begin();
files_t::iterator end = m_files.end();
for (files_t::iterator it = begin; it != end; ++it) {
for (iterator it = begin(); it != end(); ++it) {
if (it->m_exists) {
err = it->open_or_create(
@ -123,7 +116,7 @@ Tablespace::open_or_create(bool is_temp)
the proper way. */
it->close();
if (it == begin) {
if (it == begin()) {
/* First data file. */
/* Create the tablespace entry for the multi-file
@ -153,11 +146,9 @@ Tablespace::open_or_create(bool is_temp)
/** Find a filename in the list of Datafiles for a tablespace
@return true if the filename exists in the data files */
bool
Tablespace::find(const char* filename)
Tablespace::find(const char* filename) const
{
files_t::const_iterator end = m_files.end();
for (files_t::const_iterator it = m_files.begin(); it != end; ++it) {
for (const_iterator it = begin(); it != end(); ++it) {
if (innobase_strcasecmp(filename, it->m_filename) == 0) {
return(true);
@ -171,9 +162,7 @@ Tablespace::find(const char* filename)
void
Tablespace::delete_files()
{
files_t::iterator end = m_files.end();
for (files_t::iterator it = m_files.begin(); it != end; ++it) {
for (iterator it = begin(); it != end(); ++it) {
it->close();

View File

@ -212,7 +212,7 @@ static ulong innobase_commit_concurrency = 0;
static ulong innobase_read_io_threads;
static ulong innobase_write_io_threads;
static long long innobase_buffer_pool_size, innobase_log_file_size;
static long long innobase_buffer_pool_size;
/** Percentage of the buffer pool to reserve for 'old' blocks.
Connected to buf_LRU_old_ratio. */
@ -4242,8 +4242,6 @@ innobase_change_buffering_inited_ok:
srv_file_flush_method_str = innobase_file_flush_method;
srv_log_file_size = (ib_uint64_t) innobase_log_file_size;
if (UNIV_PAGE_SIZE_DEF != srv_page_size) {
ib::info() << "innodb_page_size=" << srv_page_size;
@ -5975,14 +5973,6 @@ innobase_match_index_columns(
spatial index on it and we intend to use DATA_GEOMETRY
for legacy GIS data types which are of var-length. */
switch (col_type) {
case DATA_POINT:
case DATA_VAR_POINT:
if (DATA_POINT_MTYPE(mtype)
|| mtype == DATA_GEOMETRY
|| mtype == DATA_BLOB) {
break;
}
/* Fall through */
case DATA_GEOMETRY:
if (mtype == DATA_BLOB) {
break;
@ -7973,12 +7963,6 @@ build_template_field(
prebuilt->templ_contains_blob = TRUE;
}
if (templ->type == DATA_POINT) {
/* We set this only when it's DATA_POINT, but not
DATA_VAR_POINT */
prebuilt->templ_contains_fixed_point = TRUE;
}
return(templ);
}
@ -8064,7 +8048,6 @@ ha_innobase::build_template(
/* Prepare to build m_prebuilt->mysql_template[]. */
m_prebuilt->templ_contains_blob = FALSE;
m_prebuilt->templ_contains_fixed_point = FALSE;
m_prebuilt->mysql_prefix_len = 0;
m_prebuilt->n_template = 0;
m_prebuilt->idx_cond_n_cols = 0;
@ -8501,15 +8484,15 @@ ha_innobase::write_row(
|| sql_command == SQLCOM_OPTIMIZE
|| sql_command == SQLCOM_CREATE_INDEX
#ifdef WITH_WSREP
|| (wsrep_on(m_user_thd) && wsrep_load_data_splitting &&
sql_command == SQLCOM_LOAD &&
!thd_test_options(
m_user_thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
|| (sql_command == SQLCOM_LOAD
&& wsrep_load_data_splitting && wsrep_on(m_user_thd)
&& !thd_test_options(
m_user_thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
#endif /* WITH_WSREP */
|| sql_command == SQLCOM_DROP_INDEX)
&& m_num_write_row >= 10000) {
#ifdef WITH_WSREP
if (wsrep_on(m_user_thd) && sql_command == SQLCOM_LOAD) {
if (sql_command == SQLCOM_LOAD && wsrep_on(m_user_thd)) {
WSREP_DEBUG("forced trx split for LOAD: %s",
wsrep_thd_query(m_user_thd));
}
@ -8955,8 +8938,6 @@ calc_row_difference(
switch (col_type) {
case DATA_BLOB:
case DATA_POINT:
case DATA_VAR_POINT:
case DATA_GEOMETRY:
o_ptr = row_mysql_read_blob_ref(&o_len, o_ptr, o_len);
n_ptr = row_mysql_read_blob_ref(&n_len, n_ptr, n_len);
@ -11719,10 +11700,6 @@ create_table_info_t::create_table_def()
}
}
if (col_type == DATA_POINT) {
col_len = DATA_POINT_LEN;
}
is_virtual = (innobase_is_v_fld(field)) ? DATA_VIRTUAL : 0;
is_stored = innobase_is_s_fld(field);
@ -13036,8 +13013,6 @@ create_table_info_t::set_tablespace_type(
int
create_table_info_t::initialize()
{
trx_t* parent_trx __attribute__((unused));
DBUG_ENTER("create_table_info_t::initialize");
ut_ad(m_thd != NULL);
@ -13059,7 +13034,7 @@ create_table_info_t::initialize()
/* Get the transaction associated with the current thd, or create one
if not yet created */
parent_trx = check_trx_exists(m_thd);
check_trx_exists(m_thd);
DBUG_RETURN(0);
}
@ -21199,10 +21174,12 @@ static MYSQL_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size,
"The size of the buffer which InnoDB uses to write log to the log files on disk.",
NULL, NULL, 16*1024*1024L, 256*1024L, LONG_MAX, 1024);
static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size,
static MYSQL_SYSVAR_ULONGLONG(log_file_size, srv_log_file_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Size of each log file in a log group.",
NULL, NULL, 48 << 20, 1 << 20, 512ULL << 30, 1 << 20);
NULL, NULL, 48 << 20, 1 << 20, 512ULL << 30, UNIV_PAGE_SIZE_MAX);
/* OS_FILE_LOG_BLOCK_SIZE would be more appropriate than UNIV_PAGE_SIZE_MAX,
but fil_space_t is being used for the redo log, and it uses data pages. */
static MYSQL_SYSVAR_ULONG(log_files_in_group, srv_n_log_files,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,

View File

@ -1760,7 +1760,6 @@ innobase_col_to_mysql(
memcpy(dest, data, len);
break;
case DATA_VAR_POINT:
case DATA_GEOMETRY:
case DATA_BLOB:
/* Skip MySQL BLOBs when reporting an erroneous row
@ -1785,7 +1784,6 @@ innobase_col_to_mysql(
case DATA_FLOAT:
case DATA_DOUBLE:
case DATA_DECIMAL:
case DATA_POINT:
/* Above are the valid column types for MySQL data. */
ut_ad(flen == len);
/* fall through */
@ -3011,29 +3009,6 @@ innobase_check_foreigns(
return(false);
}
/** Get the default POINT value in MySQL format
@param[in] heap memory heap where allocated
@param[in] length length of MySQL format
@return mysql format data */
static
const byte*
innobase_build_default_mysql_point(
mem_heap_t* heap,
ulint length)
{
byte* buf = static_cast<byte*>(mem_heap_alloc(
heap, DATA_POINT_LEN + length));
byte* wkb = buf + length;
ulint len = get_wkb_of_default_point(SPDIMS, wkb, DATA_POINT_LEN);
ut_ad(len == DATA_POINT_LEN);
row_mysql_store_blob_ref(buf, length, wkb, len);
return(buf);
}
/** Convert a default value for ADD COLUMN.
@param heap Memory heap where allocated
@ -3060,16 +3035,6 @@ innobase_build_col_map_add(
const byte* mysql_data = field->ptr;
if (dfield_get_type(dfield)->mtype == DATA_POINT) {
/** If the DATA_POINT field is NOT NULL, we need to
give it a default value, since DATA_POINT is a fixed length
type, we couldn't store a value of length 0, like other
geom types. Server doesn't provide the default value, and
we would use POINT(0 0) here instead. */
mysql_data = innobase_build_default_mysql_point(heap, size);
}
row_mysql_store_col_in_innobase_format(
dfield, buf, true, mysql_data, size, comp);
}
@ -4703,12 +4668,6 @@ prepare_inplace_alter_table_dict(
}
if (col_type == DATA_POINT) {
/* DATA_POINT should be of fixed length,
instead of the pack_length(blob length). */
col_len = DATA_POINT_LEN;
}
if (dict_col_name_is_reserved(field->field_name.str)) {
dict_mem_table_free(ctx->new_table);
my_error(ER_WRONG_COLUMN_NAME, MYF(0),

Some files were not shown because too many files have changed in this diff Show More