Commit 5c0df0e4 authored by Alexander Barkov's avatar Alexander Barkov

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

parents 25ad623d ad2d722a
......@@ -40,13 +40,15 @@ matrix:
include:
- os: linux
compiler: gcc
# disable cache - was out of disk space
cache: false
script:
- ${CC} --version ; ${CXX} --version
- source .travis.compiler.sh
# https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
# in trusty containers
- export MTR_MEM=/tmp
- env DEB_BUILD_OPTIONS="parallel=6" debian/autobake-deb.sh;
- env DEB_BUILD_OPTIONS="parallel=6" MYSQL_BUILD_PATH=/usr/local/bin:/usr/bin:/bin debian/autobake-deb.sh;
- ccache --show-stats
# Until OSX becomes a bit more stable: MDEV-12435
allow_failures:
......@@ -62,13 +64,6 @@ matrix:
- os: osx
compiler: clang
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
# MDEV-13002 plugins.server_audit and plugins.thread_pool_server_audit test fail due to mysqltest error
- os: linux
compiler: gcc
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
- os: linux
compiler: clang
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
# Matrix include for coverity
# - env:
......@@ -151,6 +146,7 @@ addons:
- libdistro-info-perl
- uuid-dev
- devscripts # implicit for any build on Ubuntu
- fakeroot
# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
......
......@@ -35,6 +35,11 @@ fi
# git clean -fdX removes all ignored (build) files
commands="\
git clean -fdX
cd ./libmariadb
git submodule update
cd ../storage/rocksdb/rocksdb
git submodule update
cd ../../..
path=`dirname $0`
. \"$path/autorun.sh\""
......
......@@ -289,6 +289,11 @@ gcov_compile_flags="-fprofile-arcs -ftest-coverage"
gcov_compile_flags="$gcov_compile_flags -DDISABLE_TAO_ASM"
gcov_compile_flags="$gcov_compile_flags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov"
#
# The following plugins doesn't work on 32 bit systems
disable_64_bit_plugins="--without-plugin-tokudb --without-plugin-rocksdb"
# GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well
# as on the compiler command line), and this requires setting LDFLAGS for BDB.
......
#! /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"
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$amd64_cflags -pg -g"
extra_configs="$amd64_configs $max_configs --disable-shared $static_link"
. "$path/FINISH.sh"
......@@ -20,7 +20,7 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags"
extra_configs="$pentium_configs"
extra_configs="$pentium_configs $disable_64_bit_plugins"
strip=yes
. "$path/FINISH.sh"
......@@ -19,6 +19,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs"
extra_configs="$pentium_configs $debug_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
......@@ -5,6 +5,6 @@ set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $all_configs $error_inject --with-experimental-collations"
extra_configs="$pentium_configs $debug_configs $all_configs $error_inject --with-experimental-collations $disable_64_bit_plugins"
. "$path/FINISH.sh"
......@@ -19,6 +19,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $max_configs $error_inject --with-experimental-collations"
extra_configs="$pentium_configs $debug_configs $max_configs $error_inject --with-experimental-collations $disable_64_bit_plugins"
. "$path/FINISH.sh"
......@@ -20,6 +20,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $max_no_embedded_configs"
extra_configs="$pentium_configs $debug_configs $max_no_embedded_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
#! /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"
#! /bin/sh
# Builds server without query cache support
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $max_no_qc_configs"
. "$path/FINISH.sh"
......@@ -19,7 +19,7 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs"
extra_configs="$pentium_configs $debug_configs $disable_64_bit_plugins"
extra_configs="$extra_configs --with-debug --with-ssl=/usr"
......
......@@ -7,6 +7,6 @@ set -- "$@" --with-debug=full
extra_flags="$pentium_cflags $debug_cflags -g -O0 $wsrep_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $wsrep_configs --with-wsrep"
extra_configs="$pentium_configs $debug_configs $wsrep_configs --with-wsrep $disable_64_bit_plugins"
. "$path/FINISH.sh"
......@@ -40,6 +40,6 @@ export LDFLAGS="$gcov_link_flags"
extra_flags="$pentium_cflags $debug_cflags $max_cflags $gcov_compile_flags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs"
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
......@@ -19,6 +19,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $gprof_compile_flags"
extra_configs="$pentium_configs $debug_configs $gprof_link_flags"
extra_configs="$pentium_configs $debug_configs $gprof_link_flags $disable_64_bit_plugins"
. "$path/FINISH.sh"
......@@ -35,6 +35,6 @@ extra_flags="$fast_cflags -unroll2 -ip -mp -restrict"
# icpc: error: problem during multi-file optimization compilation (code 1)
extra_flags="$extra_flags -no-ipo"
base_cxxflags="-fno-exceptions -fno-rtti"
extra_configs="$pentium_configs $static_link"
extra_configs="$pentium_configs $static_link $disable_64_bit_plugins"
. "$path/FINISH.sh"
......@@ -20,6 +20,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags -g"
extra_configs="$pentium_configs $max_configs"
extra_configs="$pentium_configs $max_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (C) 2000 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags"
extra_configs="$pentium_configs --without-server"
make=no
strip=yes
. "$path/FINISH.sh"
......@@ -33,6 +33,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh"
......@@ -4,7 +4,7 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags $wsrep_cflags"
extra_configs="$pentium_configs $wsrep_configs --with-wsrep"
extra_configs="$pentium_configs $wsrep_configs --with-wsrep $disable_64_bit_plugins"
#strip=yes
......
#! /bin/sh
# Copyright (c) 2005, 2006 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$ppc_cflags $debug_cflags"
extra_configs="$debug_configs $max_configs"
. "$path/FINISH.sh"
......@@ -422,14 +422,6 @@ typedef struct st_io_cache /* Used when cacheing files */
/* The non-inclusive boundary of the valid write area */
uchar *write_end;
/*
Current_pos and current_end are convenience variables used by
my_b_tell() and other routines that need to know the current offset
current_pos points to &write_pos, and current_end to &write_end in a
WRITE_CACHE, and &read_pos and &read_end respectively otherwise
*/
uchar **current_pos, **current_end;
/*
The lock is for append buffer used in SEQ_READ_APPEND cache
need mutex copying from append buffer to read buffer.
......@@ -584,7 +576,11 @@ static inline size_t my_b_fill(IO_CACHE *info)
static inline my_off_t my_b_tell(const IO_CACHE *info)
{
return info->pos_in_file + (*info->current_pos - info->request_pos);
if (info->type == WRITE_CACHE) {
return info->pos_in_file + (info->write_pos - info->request_pos);
}
return info->pos_in_file + (info->read_pos - info->request_pos);
}
static inline my_off_t my_b_write_tell(const IO_CACHE *info)
......@@ -609,7 +605,10 @@ static inline my_off_t my_b_get_pos_in_file(const IO_CACHE *info)
static inline size_t my_b_bytes_in_cache(const IO_CACHE *info)
{
return *info->current_end - *info->current_pos;
if (info->type == WRITE_CACHE) {
return info->write_end - info->write_pos;
}
return info->read_end - info->read_pos;
}
int my_b_copy_to_file(IO_CACHE *cache, FILE *file);
......@@ -803,7 +802,6 @@ extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize,
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
my_off_t seek_offset, my_bool use_async_io,
my_bool clear_cache);
extern void setup_io_cache(IO_CACHE* info);
extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
IO_CACHE *write_cache, uint num_threads);
......
......@@ -8,4 +8,5 @@ if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_N
{
--skip Test requires wsrep_on=ON
}
--source include/wait_until_ready.inc
......@@ -1002,3 +1002,56 @@ f
2
DROP TABLE cte;
DROP TABLE t;
#
# MDEV-13107: SHOW TABLE STATUS, SHOW CREATE VIEW
# for CTEs that use derived tables
#
create table t1(a int) engine=myisam;
insert into t1 values (3), (1), (2);
create table t2 (b int) engine=myisam;
insert into t2 values (2), (10);
create view v1 as
with t as (select s.a from (select t1.a from t1) s),
r as(select t.a from t2, t where t2.b=t.a)
select a from r;
create view v2 as
with t as (select s.a from (select t1.a from t1) s),
r as(select t.a from t2, t where t2.b=t.a)
select a from t1;
show table status;
show create view v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `r`.`a` AS `a` from `r` latin1 latin1_swedish_ci
show create view v2;
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `test`.`t1`.`a` AS `a` from `test`.`t1` latin1 latin1_swedish_ci
select * from v1;
a
2
select * from v2;
a
3
1
2
prepare stmt1 from "select * from v1";
execute stmt1;
a
2
execute stmt1;
a
2
prepare stmt2 from "select * from v2";
execute stmt2;
a
3
1
2
execute stmt2;
a
3
1
2
deallocate prepare stmt1;
deallocate prepare stmt2;
drop view v1,v2;
drop table t1,t2;
......@@ -8725,3 +8725,60 @@ EXPLAIN
}
DROP VIEW v1;
DROP TABLE t1;
#
# MDEV-13193: pushdown of equality extracted from multiple equality
#
CREATE TABLE t1 (i1 int, KEY(i1)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (i2 int) ENGINE=MyISAM;
INSERT INTO t2 VALUES (2),(4);
CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2;
SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq
WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 );
i1 i2
explain format=json SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq
WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 );
EXPLAIN
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "t1",
"access_type": "ref",
"possible_keys": ["i1"],
"key": "i1",
"key_length": "5",
"used_key_parts": ["i1"],
"ref": ["const"],
"rows": 1,
"filtered": 100,
"using_index": true
},
"block-nl-join": {
"table": {
"table_name": "<derived3>",
"access_type": "ALL",
"rows": 2,
"filtered": 100,
"attached_condition": "v2.i2 = 1"
},
"buffer_type": "flat",
"buffer_size": "256Kb",
"join_type": "BNL",
"materialized": {
"query_block": {
"select_id": 3,
"table": {
"table_name": "t2",
"access_type": "ALL",
"rows": 2,
"filtered": 100,
"attached_condition": "t2.i2 = 1"
}
}
}
}
}
}
DROP VIEW v2;
DROP TABLE t1,t2;
......@@ -1107,7 +1107,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system NULL NULL NULL NULL 1
1 PRIMARY t2 ref a a 4 const 1 Using index
1 PRIMARY <derived2> ref key0 key0 8 const,const 1
2 DERIVED t3 ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
2 DERIVED t3 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
SELECT * FROM t1, t2, v1 WHERE t2.a=t1.a AND t2.a=v1.a AND t2.a=v1.b;
a a a b
c c c c
......
......@@ -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
......
......@@ -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
#
#
......
......@@ -43,6 +43,6 @@ a
1
2
3
InnoDB: Last MySQL binlog file position 0 <pos>, file name ./master-bin.000001
InnoDB: Last binlog file './master-bin.000001', position <pos>
SET DEBUG_SYNC= 'RESET';
DROP TABLE t1;
......@@ -44,6 +44,6 @@ a
1
2
3
InnoDB: Last MySQL binlog file position 0 <pos>, file name ./master-bin.000001
InnoDB: Last binlog file './master-bin.000001', position <pos>
SET DEBUG_SYNC= 'RESET';
DROP TABLE t1;
......@@ -340,7 +340,7 @@ WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ pages; LSN=\d+/ in mysqld.1.err
FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err
# Cleanup
bak_ib_logfile0
bak_ib_logfile1
......
......@@ -33,16 +33,16 @@ ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
......@@ -56,7 +56,7 @@ ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size/ in mysqld.1.err
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err
......
......@@ -9,7 +9,7 @@
# Don't test this under valgrind, memory leaks will occur as we crash
--source include/not_valgrind.inc
# The test case currently uses grep and tail, which may be unavailable on
# The test case currently uses sed and tail, which may be unavailable on
# some windows systems. But see MWL#191 for how to remove the need for grep.
--source include/not_windows.inc
......@@ -99,7 +99,7 @@ SELECT * FROM t1 ORDER BY a;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let pos=`select $binlog_start_pos + 730`;
--replace_result $pos <pos>
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
--exec sed -ne 's/.*\(InnoDB: Last binlog file .* position.*\)/\1/p' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
SET DEBUG_SYNC= 'RESET';
DROP TABLE t1;
......@@ -9,7 +9,7 @@
# Don't test this under valgrind, memory leaks will occur as we crash
--source include/not_valgrind.inc
# The test case currently uses grep and tail, which may be unavailable on
# The test case currently uses sed and tail, which may be unavailable on
# some windows systems. But see MWL#191 for how to remove the need for grep.
--source include/not_windows.inc
......@@ -100,6 +100,6 @@ SELECT * FROM t1 ORDER BY a;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let pos=`select $binlog_start_pos + 730`;
--replace_result $pos <pos>
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
--exec sed -ne 's/.*\(InnoDB: Last binlog file .* position.*\)/\1/p' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
SET DEBUG_SYNC= 'RESET';
DROP TABLE t1;
......@@ -218,7 +218,7 @@ eval $check_no_innodb;
--source include/start_mysqld.inc
eval $check_yes_innodb;
--source include/shutdown_mysqld.inc
--let SEARCH_PATTERN=Resizing redo log from 1\*\d+ to 3\*\d+ pages; LSN=\d+
--let SEARCH_PATTERN=Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+
--source include/search_pattern_in_file.inc
--let $restart_parameters=
......
......@@ -100,14 +100,14 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_5
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --innodb-read-only
......@@ -122,7 +122,7 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_7
......@@ -170,7 +170,7 @@ EOF
--source include/start_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size;
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes;
--source include/search_pattern_in_file.inc
--remove_file $MYSQLD_DATADIR/ib_logfile0
--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
......
......@@ -135,12 +135,29 @@ INSERT INTO articles (title, body) VALUES
('How To Use MySQL Well','After you went through a ...'),
('Optimizing MySQL','In this tutorial we will show ...'),
('1001 MySQL Tricks','How to use full-text search engine'),
('Go MySQL Tricks','How to use full text search engine');
('Go MariaDB Tricks','How to use full text search engine');
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('MySQL');
id title body
6 MySQL Tutorial DBMS stands for MySQL DataBase ...
7 How To Use MySQL Well After you went through a ...
8 Optimizing MySQL In this tutorial we will show ...
9 1001 MySQL Tricks How to use full-text search engine
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('tutorial');
id title body
6 MySQL Tutorial DBMS stands for MySQL DataBase ...
8 Optimizing MySQL In this tutorial we will show ...
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('Tricks');
id title body
9 1001 MySQL Tricks How to use full-text search engine
10 Go MySQL Tricks How to use full text search engine
10 Go MariaDB Tricks How to use full text search engine
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('full text search');
id title body
10 Go MariaDB Tricks How to use full text search engine
9 1001 MySQL Tricks How to use full-text search engine
SELECT COUNT(*) FROM articles;
COUNT(*)
5
......
......@@ -145,13 +145,18 @@ INSERT INTO articles (title, body) VALUES
('How To Use MySQL Well','After you went through a ...'),
('Optimizing MySQL','In this tutorial we will show ...'),
('1001 MySQL Tricks','How to use full-text search engine'),
('Go MySQL Tricks','How to use full text search engine');
('Go MariaDB Tricks','How to use full text search engine');
--source include/restart_mysqld.inc
# Simple term search - 4 records expected
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('MySQL');
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('tutorial');
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('Tricks');
SELECT * FROM articles WHERE
MATCH(title, body) AGAINST('full text search');
SELECT COUNT(*) FROM articles;
DROP TABLE articles;
......
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;
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
......
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 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;
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;
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;
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
--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;
-- 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;
......
--innodb_large_prefix=ON
\ No newline at end of file
This diff is collapsed.
--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;
--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;
--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;
--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;
--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;
......@@ -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
......
......@@ -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
......
......@@ -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
......
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;
"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;
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;
###################### 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 #
###################################################
###################### 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;
This diff is collapsed.
--source include/have_wsrep.inc
--source include/have_wsrep_enabled.inc
--source include/have_binlog_format_row.inc
--echo
......
This diff is collapsed.
......@@ -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;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment