mirror of
https://github.com/MariaDB/server.git
synced 2026-04-19 06:45:32 +02:00
System Versioning 1.0pre2
Merge branch '10.3' into trunk
This commit is contained in:
commit
6e0b2c7fe0
104 changed files with 2568 additions and 5169 deletions
44
.travis.yml
44
.travis.yml
|
|
@ -18,16 +18,12 @@ compiler:
|
|||
|
||||
cache:
|
||||
apt: true
|
||||
ccache: true
|
||||
ccache: true # Does not currently work for clang builds: https://github.com/travis-ci/travis-ci/issues/6201
|
||||
directories:
|
||||
- /usr/local/Cellar
|
||||
- /usr/local/Cellar # Fails do to permission error: https://github.com/travis-ci/travis-ci/issues/8092
|
||||
|
||||
env:
|
||||
matrix:
|
||||
# - GCC_VERSION=4.8 TYPE=Debug MYSQL_TEST_SUITES=rpl
|
||||
# - GCC_VERSION=5 TYPE=Debug MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
|
||||
# - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
|
||||
# - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
|
||||
- GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
|
||||
- GCC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
|
||||
- GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
|
||||
|
|
@ -40,6 +36,8 @@ matrix:
|
|||
include:
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
- DebPackages
|
||||
addons:
|
||||
apt:
|
||||
packages: # make sure these match debian/control contents
|
||||
|
|
@ -80,7 +78,6 @@ matrix:
|
|||
- fakeroot
|
||||
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
|
||||
|
|
@ -101,44 +98,13 @@ matrix:
|
|||
compiler: clang
|
||||
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
|
||||
|
||||
# Matrix include for coverity
|
||||
# - env:
|
||||
# - GCC_VERSION=6
|
||||
# addon:
|
||||
# coverity_scan:
|
||||
# # ref: https://scan.coverity.com/travis_ci
|
||||
# # GitHub project metadata
|
||||
# project:
|
||||
# - name: MariaDB/server
|
||||
# - description: MariaDB Server
|
||||
#
|
||||
# # Where email notification of build analysis results will be sent
|
||||
# notification_email: security@mariadb.org
|
||||
#
|
||||
# # Commands to prepare for build_command
|
||||
# build_command_prepend:
|
||||
# - source .travis.compiler.sh
|
||||
# - ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version
|
||||
# - cmake .
|
||||
# -DCMAKE_BUILD_TYPE=Debug
|
||||
# -DWITH_SSL=system -DWITH_ZLIB=system
|
||||
# -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON
|
||||
#
|
||||
# # The command that will be added as an argument to "cov-build" to compile your project for analysis,
|
||||
# build_command: make -j 4
|
||||
#
|
||||
# # Pattern to match selecting branches that will run analysis.
|
||||
# # Take care in resource usage, and consider the build frequency allowances per
|
||||
# # https://scan.coverity.com/faq#frequency - 7 per week is the current limit.
|
||||
# branch_pattern: .*coverity.*
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-4.0
|
||||
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
|
||||
packages: # make sure these match the build requirements
|
||||
packages: # make sure these include all compilers and all build dependencies (see list above)
|
||||
- gcc-5
|
||||
- g++-5
|
||||
- gcc-6
|
||||
|
|
|
|||
25
debian/autobake-deb.sh
vendored
25
debian/autobake-deb.sh
vendored
|
|
@ -6,16 +6,11 @@
|
|||
# Exit immediately on any error
|
||||
set -e
|
||||
|
||||
# On Buildbot, don't run the mysql-test-run test suite as part of build.
|
||||
# It takes a lot of time, and we will do a better test anyway in
|
||||
# Buildbot, running the test suite from installed .debs on a clean VM.
|
||||
# On Travis-CI we want to simulate the full build, including tests.
|
||||
# Also on Travis-CI it is useful not to override the DEB_BUILD_OPTIONS
|
||||
# at this stage at all.
|
||||
if [[ ! $TRAVIS ]]
|
||||
then
|
||||
export DEB_BUILD_OPTIONS="nocheck"
|
||||
fi
|
||||
# This file is invocated from Buildbot and Travis-CI to build deb packages.
|
||||
# As both of those CI systems have many parallel jobs that include different
|
||||
# parts of the test suite, we don't need to run the mysql-test-run at all when
|
||||
# building the deb packages here.
|
||||
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
|
||||
|
||||
# Travis-CI optimizations
|
||||
if [[ $TRAVIS ]]
|
||||
|
|
@ -26,6 +21,12 @@ then
|
|||
# Don't include test suite package on Travis-CI to make the build time shorter
|
||||
sed '/Package: mariadb-test-data/,+28d' -i debian/control
|
||||
sed '/Package: mariadb-test/,+36d' -i debian/control
|
||||
|
||||
# Don't build the test package at all to save time and disk space
|
||||
sed 's|DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test|DINSTALL_MYSQLTESTDIR=false|' -i debian/rules
|
||||
|
||||
# Also skip building RocksDB and TokuDB to save even more time and disk space
|
||||
sed 's|-DDEB|-DWITHOUT_TOKUDB_STORAGE_ENGINE=true -DWITHOUT_MROONGA_STORAGE_ENGINE=true -DWITHOUT_ROCKSDB_STORAGE_ENGINE=true -DDEB|' -i debian/rules
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -77,11 +78,11 @@ fi
|
|||
GCCVERSION=$(gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$/&00/')
|
||||
# Don't build rocksdb package if gcc version is less than 4.8 or we are running on
|
||||
# x86 32 bit.
|
||||
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]]
|
||||
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]] || [[ $TRAVIS ]]
|
||||
then
|
||||
sed '/Package: mariadb-plugin-rocksdb/,+11d' -i debian/control
|
||||
fi
|
||||
if [[ $GCCVERSION -lt 40800 ]]
|
||||
if [[ $GCCVERSION -lt 40800 ]] || [[ $TRAVIS ]]
|
||||
then
|
||||
sed '/Package: mariadb-plugin-aws-key-management-10.2/,+13d' -i debian/control
|
||||
fi
|
||||
|
|
|
|||
2
debian/rules
vendored
2
debian/rules
vendored
|
|
@ -32,7 +32,7 @@ CXX := $(DEB_HOST_GNU_TYPE)-g++
|
|||
# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
|
||||
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
MAKEFLAGS += -j $(NUMJOBS)
|
||||
MAKEFLAGS += -j$(NUMJOBS)
|
||||
else
|
||||
# NUMJOBS cannot be empty as it is used as a parameter to mtr, default to 1.
|
||||
NUMJOBS = 1
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#ifndef _m_string_h
|
||||
#define _m_string_h
|
||||
|
||||
#include "my_global.h" /* HAVE_* */
|
||||
#include "my_decimal_limits.h"
|
||||
|
||||
#ifndef __USE_GNU
|
||||
|
|
|
|||
|
|
@ -51,6 +51,14 @@ enum enum_vio_io_event
|
|||
VIO_IO_EVENT_CONNECT
|
||||
};
|
||||
|
||||
struct vio_keepalive_opts
|
||||
{
|
||||
int interval;
|
||||
int idle;
|
||||
int probes;
|
||||
};
|
||||
|
||||
|
||||
#define VIO_LOCALHOST 1U /* a localhost connection */
|
||||
#define VIO_BUFFERED_READ 2U /* use buffered read */
|
||||
#define VIO_READ_BUFFER_SIZE 16384U /* size of read buffer */
|
||||
|
|
@ -84,6 +92,7 @@ my_bool vio_is_blocking(Vio *vio);
|
|||
int vio_fastsend(Vio *vio);
|
||||
/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible */
|
||||
int vio_keepalive(Vio *vio, my_bool onoff);
|
||||
int vio_set_keepalive_options(Vio * vio, const struct vio_keepalive_opts *opts);
|
||||
/* Whenever we should retry the last read/write operation. */
|
||||
my_bool vio_should_retry(Vio *vio);
|
||||
/* Check that operation was timed out */
|
||||
|
|
@ -214,7 +223,6 @@ enum SSL_type
|
|||
SSL_TYPE_SPECIFIED
|
||||
};
|
||||
|
||||
|
||||
/* HFTODO - hide this if we don't want client in embedded server */
|
||||
/* This structure is for every connection on both sides */
|
||||
struct st_vio
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/mysql-test/r/mysqld--help.result
|
||||
+++ b/mysql-test/r/mysqld--help.result
|
||||
@@ -334,7 +334,6 @@
|
||||
@@ -381,7 +381,6 @@
|
||||
The number of segments in a key cache
|
||||
-L, --language=name Client error messages in given language. May be given as
|
||||
a full path. Deprecated. Use --lc-messages-dir instead.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
--lc-messages=name Set the language used for the error messages.
|
||||
-L, --lc-messages-dir=name
|
||||
Directory where error messages are
|
||||
@@ -543,6 +542,7 @@
|
||||
@@ -602,6 +601,7 @@
|
||||
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
|
||||
DATETIME, TIMESTAMP columns.
|
||||
(Defaults to on; use --skip-mysql56-temporal-format to disable.)
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
--net-buffer-length=#
|
||||
Buffer length for TCP/IP and socket communication
|
||||
--net-read-timeout=#
|
||||
@@ -957,6 +957,9 @@
|
||||
@@ -1020,6 +1020,9 @@
|
||||
characteristics (isolation level, read only/read
|
||||
write,snapshot - but not any work done / data modified
|
||||
within the transaction).
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
--show-slave-auth-info
|
||||
Show user and password in SHOW SLAVE HOSTS on this
|
||||
master.
|
||||
@@ -1069,6 +1072,10 @@
|
||||
@@ -1132,6 +1135,10 @@
|
||||
Log slow queries to given log file. Defaults logging to
|
||||
'hostname'-slow.log. Must be enabled to activate other
|
||||
slow log options
|
||||
|
|
@ -37,15 +37,15 @@
|
|||
--socket=name Socket file to use for connection
|
||||
--sort-buffer-size=#
|
||||
Each thread that needs to do a sort allocates a buffer of
|
||||
@@ -1087,6 +1094,7 @@
|
||||
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
|
||||
@@ -1151,6 +1158,7 @@
|
||||
EMPTY_STRING_IS_NULL
|
||||
--stack-trace Print a symbolic stack trace on failure
|
||||
(Defaults to on; use --skip-stack-trace to disable.)
|
||||
+ --standalone Dummy option to start as a standalone program (NT).
|
||||
--standard-compliant-cte
|
||||
Allow only CTEs compliant to SQL standard
|
||||
(Defaults to on; use --skip-standard-compliant-cte to disable.)
|
||||
@@ -1134,6 +1142,11 @@
|
||||
@@ -1214,6 +1222,11 @@
|
||||
--thread-pool-max-threads=#
|
||||
Maximum allowed number of worker threads in the thread
|
||||
pool
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
--thread-pool-oversubscribe=#
|
||||
How many additional active worker threads in a group are
|
||||
allowed.
|
||||
@@ -1172,8 +1185,8 @@
|
||||
@@ -1252,8 +1265,8 @@
|
||||
automatically convert it to an on-disk MyISAM or Aria
|
||||
table.
|
||||
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
--transaction-alloc-block-size=#
|
||||
Allocation block size for transactions to be stored in
|
||||
binary log
|
||||
@@ -1298,7 +1311,6 @@
|
||||
@@ -1387,7 +1400,6 @@
|
||||
key-cache-division-limit 100
|
||||
key-cache-file-hash-size 512
|
||||
key-cache-segments 0
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
lc-messages en_US
|
||||
lc-messages-dir MYSQL_SHAREDIR/
|
||||
lc-time-names en_US
|
||||
@@ -1368,6 +1380,7 @@
|
||||
@@ -1459,6 +1471,7 @@
|
||||
myisam-stats-method NULLS_UNEQUAL
|
||||
myisam-use-mmap FALSE
|
||||
mysql56-temporal-format TRUE
|
||||
|
|
@ -84,16 +84,16 @@
|
|||
net-buffer-length 16384
|
||||
net-read-timeout 30
|
||||
net-retry-count 10
|
||||
@@ -1469,6 +1482,8 @@
|
||||
@@ -1561,6 +1574,8 @@
|
||||
session-track-state-change FALSE
|
||||
session-track-system-variables
|
||||
session-track-system-variables autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
session-track-transaction-info OFF
|
||||
+shared-memory FALSE
|
||||
+shared-memory-base-name MYSQL
|
||||
show-slave-auth-info FALSE
|
||||
silent-startup FALSE
|
||||
skip-grant-tables TRUE
|
||||
@@ -1493,6 +1508,7 @@
|
||||
@@ -1585,6 +1600,7 @@
|
||||
slave-type-conversions
|
||||
slow-launch-time 2
|
||||
slow-query-log FALSE
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
sort-buffer-size 2097152
|
||||
sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||
stack-trace TRUE
|
||||
@@ -1506,14 +1522,16 @@
|
||||
@@ -1598,9 +1614,9 @@
|
||||
sync-relay-log 10000
|
||||
sync-relay-log-info 10000
|
||||
sysdate-is-now FALSE
|
||||
|
|
@ -112,6 +112,8 @@
|
|||
+table-open-cache 2000
|
||||
table-open-cache-instances 8
|
||||
tc-heuristic-recover OFF
|
||||
tcp-keepalive-interval 0
|
||||
@@ -1609,6 +1625,8 @@
|
||||
thread-cache-size 151
|
||||
thread-pool-idle-timeout 60
|
||||
thread-pool-max-threads 65536
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ The following options may be given as the first argument:
|
|||
--binlog-do-db=name Tells the master it should log updates for the specified
|
||||
database, and exclude all others not explicitly
|
||||
mentioned.
|
||||
--binlog-file-cache-size=#
|
||||
The size of file cache for the binary log
|
||||
--binlog-format=name
|
||||
What form of binary logging the master will use: either
|
||||
ROW for row-based binary logging, STATEMENT for
|
||||
|
|
@ -1193,6 +1195,21 @@ The following options may be given as the first argument:
|
|||
--tc-heuristic-recover=name
|
||||
Decision to use in heuristic recover process. One of: OFF,
|
||||
COMMIT, ROLLBACK
|
||||
--tcp-keepalive-interval=#
|
||||
The interval, in seconds, between when successive
|
||||
keep-alive packets are sent if no acknowledgement is
|
||||
received.If set to 0, system dependent default is used.
|
||||
(Automatically configured unless set explicitly)
|
||||
--tcp-keepalive-probes=#
|
||||
The number of unacknowledged probes to send before
|
||||
considering the connection dead and notifying the
|
||||
application layer.If set to 0, system dependent default
|
||||
is used. (Automatically configured unless set explicitly)
|
||||
--tcp-keepalive-time=#
|
||||
Timeout, in milliseconds, with no activity until the
|
||||
first TCP keep-alive packet is sent.If set to 0, system
|
||||
dependent default is used. (Automatically configured
|
||||
unless set explicitly)
|
||||
--thread-cache-size=#
|
||||
How many threads we should keep in a cache for reuse.
|
||||
These are freed after 5 minutes of idle time
|
||||
|
|
@ -1310,6 +1327,7 @@ binlog-checksum CRC32
|
|||
binlog-commit-wait-count 0
|
||||
binlog-commit-wait-usec 100000
|
||||
binlog-direct-non-transactional-updates FALSE
|
||||
binlog-file-cache-size 16384
|
||||
binlog-format MIXED
|
||||
binlog-optimize-thread-scheduling TRUE
|
||||
binlog-row-event-max-size 8192
|
||||
|
|
@ -1611,6 +1629,9 @@ table-definition-cache 400
|
|||
table-open-cache 431
|
||||
table-open-cache-instances 8
|
||||
tc-heuristic-recover OFF
|
||||
tcp-keepalive-interval 0
|
||||
tcp-keepalive-probes 0
|
||||
tcp-keepalive-time 0
|
||||
thread-cache-size 151
|
||||
thread-pool-idle-timeout 60
|
||||
thread-pool-max-threads 65536
|
||||
|
|
|
|||
|
|
@ -4,17 +4,10 @@
|
|||
# Temporary tablename will be unique. This makes sure that future
|
||||
# in-place ALTERs of the same table will not be blocked due to
|
||||
# temporary tablename.
|
||||
# Crash the server in ha_innobase::commit_inplace_alter_table()
|
||||
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
|
||||
SET debug='d,innodb_alter_commit_crash_before_commit';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
# Write file to make mysql-test-run.pl expect crash
|
||||
# Execute the statement that causes the crash
|
||||
SET debug_dbug='+d,innodb_alter_commit_crash_before_commit';
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
||||
ERROR HY000: Lost connection to MySQL server during query
|
||||
# Startup the server after the crash
|
||||
# Read and remember the temporary table name
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
|
@ -23,13 +16,6 @@ t1 CREATE TABLE `t1` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Consecutive Alter table does not create same temporary file name
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
||||
# Shutdown the server to allow manual recovery
|
||||
# Manual recovery begin. The dictionary was not updated
|
||||
# and the files were not renamed. The rebuilt table
|
||||
# was left behind on purpose, to faciliate data recovery.
|
||||
# Manual recovery end
|
||||
# Startup the server after manual recovery
|
||||
# Drop the orphaned rebuilt table.
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
--- instant_alter.result
|
||||
+++ instant_alter,32k.result
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
@@ -2,7 +2,7 @@
|
||||
# MDEV-11369: Instant ADD COLUMN for InnoDB
|
||||
#
|
||||
-CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
+CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO t VALUES(1);
|
||||
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
|
||||
-ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
|
||||
+ALTER TABLE t ADD e INT, ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO t SET a=1;
|
||||
SET @old_instant=
|
||||
(SELECT variable_value FROM information_schema.global_status
|
||||
@@ -31,12 +31,12 @@
|
||||
@@ -33,17 +33,17 @@
|
||||
`c` int(11) NOT NULL,
|
||||
`d` int(11) NOT NULL,
|
||||
UNIQUE KEY `a` (`a`)
|
||||
|
|
@ -20,11 +20,17 @@
|
|||
WHERE variable_name = 'innodb_instant_alter_column';
|
||||
instants
|
||||
-0
|
||||
+1
|
||||
SELECT variable_value-@old_instant instants
|
||||
FROM information_schema.global_status
|
||||
WHERE variable_name = 'innodb_instant_alter_column';
|
||||
instants
|
||||
-0
|
||||
+1
|
||||
DROP TABLE t;
|
||||
connect analyze, localhost, root;
|
||||
connection default;
|
||||
@@ -355,7 +355,7 @@
|
||||
@@ -374,7 +374,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -33,7 +39,7 @@
|
|||
connection default;
|
||||
ALTER TABLE big ADD COLUMN
|
||||
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
|
||||
@@ -378,7 +378,7 @@
|
||||
@@ -397,7 +397,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -42,7 +48,7 @@
|
|||
connection default;
|
||||
ROLLBACK;
|
||||
CHECKSUM TABLE big;
|
||||
@@ -391,7 +391,7 @@
|
||||
@@ -410,7 +410,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -51,7 +57,7 @@
|
|||
connection default;
|
||||
InnoDB 0 transactions not purged
|
||||
DROP TABLE t1,t2,t3,big;
|
||||
@@ -703,7 +703,7 @@
|
||||
@@ -734,7 +734,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -60,7 +66,7 @@
|
|||
connection default;
|
||||
ALTER TABLE big ADD COLUMN
|
||||
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
|
||||
@@ -726,7 +726,7 @@
|
||||
@@ -757,7 +757,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -69,7 +75,7 @@
|
|||
connection default;
|
||||
ROLLBACK;
|
||||
CHECKSUM TABLE big;
|
||||
@@ -739,7 +739,7 @@
|
||||
@@ -770,7 +770,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -78,7 +84,7 @@
|
|||
connection default;
|
||||
InnoDB 0 transactions not purged
|
||||
DROP TABLE t1,t2,t3,big;
|
||||
@@ -1051,7 +1051,7 @@
|
||||
@@ -1094,7 +1094,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -87,7 +93,7 @@
|
|||
connection default;
|
||||
ALTER TABLE big ADD COLUMN
|
||||
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
|
||||
@@ -1074,7 +1074,7 @@
|
||||
@@ -1117,7 +1117,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -96,7 +102,7 @@
|
|||
connection default;
|
||||
ROLLBACK;
|
||||
CHECKSUM TABLE big;
|
||||
@@ -1087,7 +1087,7 @@
|
||||
@@ -1130,7 +1130,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
--- instant_alter.result
|
||||
+++ instant_alter,64k.result
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
@@ -2,7 +2,7 @@
|
||||
# MDEV-11369: Instant ADD COLUMN for InnoDB
|
||||
#
|
||||
-CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
+CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO t VALUES(1);
|
||||
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
|
||||
-ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
|
||||
+ALTER TABLE t ADD e INT, ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO t SET a=1;
|
||||
SET @old_instant=
|
||||
(SELECT variable_value FROM information_schema.global_status
|
||||
@@ -31,12 +31,12 @@
|
||||
@@ -33,17 +33,17 @@
|
||||
`c` int(11) NOT NULL,
|
||||
`d` int(11) NOT NULL,
|
||||
UNIQUE KEY `a` (`a`)
|
||||
|
|
@ -20,11 +20,17 @@
|
|||
WHERE variable_name = 'innodb_instant_alter_column';
|
||||
instants
|
||||
-0
|
||||
+1
|
||||
SELECT variable_value-@old_instant instants
|
||||
FROM information_schema.global_status
|
||||
WHERE variable_name = 'innodb_instant_alter_column';
|
||||
instants
|
||||
-0
|
||||
+1
|
||||
DROP TABLE t;
|
||||
connect analyze, localhost, root;
|
||||
connection default;
|
||||
@@ -355,7 +355,7 @@
|
||||
@@ -374,7 +374,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -33,7 +39,7 @@
|
|||
connection default;
|
||||
ALTER TABLE big ADD COLUMN
|
||||
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
|
||||
@@ -378,7 +378,7 @@
|
||||
@@ -397,7 +397,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -42,7 +48,7 @@
|
|||
connection default;
|
||||
ROLLBACK;
|
||||
CHECKSUM TABLE big;
|
||||
@@ -391,7 +391,7 @@
|
||||
@@ -410,7 +410,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -51,7 +57,7 @@
|
|||
connection default;
|
||||
InnoDB 0 transactions not purged
|
||||
DROP TABLE t1,t2,t3,big;
|
||||
@@ -703,7 +703,7 @@
|
||||
@@ -734,7 +734,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -60,7 +66,7 @@
|
|||
connection default;
|
||||
ALTER TABLE big ADD COLUMN
|
||||
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
|
||||
@@ -726,7 +726,7 @@
|
||||
@@ -757,7 +757,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -69,7 +75,7 @@
|
|||
connection default;
|
||||
ROLLBACK;
|
||||
CHECKSUM TABLE big;
|
||||
@@ -739,7 +739,7 @@
|
||||
@@ -770,7 +770,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -78,7 +84,7 @@
|
|||
connection default;
|
||||
InnoDB 0 transactions not purged
|
||||
DROP TABLE t1,t2,t3,big;
|
||||
@@ -1051,7 +1051,7 @@
|
||||
@@ -1094,7 +1094,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -87,7 +93,7 @@
|
|||
connection default;
|
||||
ALTER TABLE big ADD COLUMN
|
||||
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
|
||||
@@ -1074,7 +1074,7 @@
|
||||
@@ -1117,7 +1117,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
@ -96,7 +102,7 @@
|
|||
connection default;
|
||||
ROLLBACK;
|
||||
CHECKSUM TABLE big;
|
||||
@@ -1087,7 +1087,7 @@
|
||||
@@ -1130,7 +1130,7 @@
|
||||
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
|
||||
WHERE name = 'test/big';
|
||||
clust_index_size
|
||||
|
|
|
|||
Binary file not shown.
228
mysql-test/suite/innodb/r/update_time_wl6658.result
Normal file
228
mysql-test/suite/innodb/r/update_time_wl6658.result
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
CREATE TABLE tab1(c1 int,c2 varchar(30), c3 BLOB) ENGINE=InnoDB;
|
||||
CREATE TABLE tab1u LIKE tab1;
|
||||
CREATE TABLE tab1d LIKE tab1;
|
||||
CREATE TABLE tab1i LIKE tab1;
|
||||
CREATE TABLE tab3(c1 int,c2 varchar(30)) ENGINE=InnoDB;
|
||||
CREATE TABLE tab4(c1 int,c2 varchar(30)) ENGINE=InnoDB;
|
||||
CREATE TABLE tab5(c1 int,c2 varchar(30)) ENGINE=InnoDB;
|
||||
INSERT INTO tab1u VALUES(1,'Testing the wl6658','Testing the wl6658');
|
||||
INSERT INTO tab1d VALUES(1,'Updated','Updated');
|
||||
INSERT INTO tab4 VALUES(1,'Test for Update');
|
||||
INSERT INTO tab5 VALUES(1,'Test for Delete');
|
||||
CREATE TRIGGER test_trig BEFORE INSERT ON tab1
|
||||
FOR EACH ROW BEGIN
|
||||
INSERT INTO tab3 VALUES(1,'Inserted From Trigger');
|
||||
UPDATE tab4 SET c2='Updated from Trigger' WHERE c1=1;
|
||||
DELETE FROM tab5;
|
||||
END |
|
||||
CREATE TABLE tab2(
|
||||
id INT NOT NULL,
|
||||
store_name VARCHAR(30),
|
||||
parts VARCHAR(30),
|
||||
store_id INT
|
||||
) ENGINE=InnoDB
|
||||
PARTITION BY LIST(store_id) (
|
||||
PARTITION pNorth VALUES IN (10,20,30),
|
||||
PARTITION pEast VALUES IN (40,50,60),
|
||||
PARTITION pWest VALUES IN (70,80,100)
|
||||
);
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
update_time
|
||||
NULL
|
||||
CREATE PROCEDURE proc_wl6658()
|
||||
BEGIN
|
||||
INSERT INTO tab2 VALUES(1,'ORACLE','NUTT',10);
|
||||
INSERT INTO tab2 VALUES(2,'HUAWEI','BOLT',40);
|
||||
COMMIT;
|
||||
END |
|
||||
CALL proc_wl6658;
|
||||
SELECT * FROM tab2 ORDER BY id,store_id;
|
||||
id store_name parts store_id
|
||||
1 ORACLE NUTT 10
|
||||
2 HUAWEI BOLT 40
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
COUNT(update_time)
|
||||
1
|
||||
TRUNCATE TABLE tab2;
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
COUNT(update_time)
|
||||
1
|
||||
CREATE TABLE tab7(c1 INT NOT NULL, PRIMARY KEY (c1)) ENGINE=INNODB;
|
||||
CREATE TABLE tab8(c1 INT PRIMARY KEY,c2 INT,
|
||||
FOREIGN KEY (c2) REFERENCES tab7(c1) ON DELETE CASCADE )
|
||||
ENGINE=INNODB;
|
||||
SELECT table_name,update_time
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
table_name update_time
|
||||
tab7 NULL
|
||||
tab8 NULL
|
||||
INSERT INTO tab7 VALUES(1);
|
||||
INSERT INTO tab8 VALUES(1,1);
|
||||
SELECT table_name,COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
table_name COUNT(update_time)
|
||||
tab7 1
|
||||
tab8 1
|
||||
#restart the server
|
||||
SELECT table_name,update_time
|
||||
FROM information_schema.tables
|
||||
WHERE table_name IN ('tab1','tab2','tab3','tab4','tab5','tab7','tab8')
|
||||
ORDER BY table_name;
|
||||
table_name update_time
|
||||
tab1 NULL
|
||||
tab2 NULL
|
||||
tab3 NULL
|
||||
tab4 NULL
|
||||
tab5 NULL
|
||||
tab7 NULL
|
||||
tab8 NULL
|
||||
#case1:
|
||||
BEGIN WORK;
|
||||
INSERT INTO tab1
|
||||
VALUES(1,'Testing the wl6658', 'Testing the wl6658');
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1';
|
||||
update_time
|
||||
NULL
|
||||
COMMIT;
|
||||
SELECT * FROM tab1;
|
||||
c1 c2 c3
|
||||
1 Testing the wl6658 Testing the wl6658
|
||||
SELECT * FROM tab3;
|
||||
c1 c2
|
||||
1 Inserted From Trigger
|
||||
SELECT * FROM tab4;
|
||||
c1 c2
|
||||
1 Updated from Trigger
|
||||
SELECT * FROM tab5;
|
||||
c1 c2
|
||||
SELECT table_name,COUNT(update_time)
|
||||
FROM information_schema.tables
|
||||
WHERE table_name IN ('tab1','tab3','tab4','tab5')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
table_name COUNT(update_time)
|
||||
tab1 1
|
||||
tab3 1
|
||||
tab4 1
|
||||
tab5 1
|
||||
Testcase with UPDATE stmt and transaction
|
||||
SELECT * FROM tab1u;
|
||||
c1 c2 c3
|
||||
1 Testing the wl6658 Testing the wl6658
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1u';
|
||||
update_time
|
||||
NULL
|
||||
#case2:
|
||||
START TRANSACTION;
|
||||
UPDATE tab1u SET c2='Updated',c3='Updated' WHERE c1=1;
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1u';
|
||||
update_time
|
||||
NULL
|
||||
COMMIT;
|
||||
SELECT * FROM tab1u;
|
||||
c1 c2 c3
|
||||
1 Updated Updated
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab1u';
|
||||
COUNT(update_time)
|
||||
1
|
||||
SELECT * FROM tab1d;
|
||||
c1 c2 c3
|
||||
1 Updated Updated
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1d';
|
||||
update_time
|
||||
NULL
|
||||
#case3:
|
||||
START TRANSACTION;
|
||||
DELETE FROM tab1d;
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1d';
|
||||
update_time
|
||||
NULL
|
||||
COMMIT;
|
||||
SELECT * FROM tab1d;
|
||||
c1 c2 c3
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab1d';
|
||||
COUNT(update_time)
|
||||
1
|
||||
SELECT * FROM tab1i;
|
||||
c1 c2 c3
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1i';
|
||||
update_time
|
||||
NULL
|
||||
#case4:
|
||||
START TRANSACTION;
|
||||
INSERT INTO tab1i
|
||||
VALUES(1,'Testing the wl6658', 'Testing the wl6658');
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1i';
|
||||
update_time
|
||||
NULL
|
||||
ROLLBACK;
|
||||
SELECT * FROM tab1i;
|
||||
c1 c2 c3
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1i';
|
||||
update_time
|
||||
NULL
|
||||
BEGIN WORK;
|
||||
DELETE FROM tab1i;
|
||||
SAVEPOINT A;
|
||||
INSERT INTO tab2 VALUES(1,'Oracle','NUTT',10);
|
||||
INSERT INTO tab2 VALUES(2,'HUAWEI','BOLT',40);
|
||||
SAVEPOINT B;
|
||||
INSERT INTO tab2 VALUES(3,'IBM','NAIL',70);
|
||||
SAVEPOINT C;
|
||||
ROLLBACK to A;
|
||||
SELECT * FROM tab2;
|
||||
id store_name parts store_id
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
update_time
|
||||
NULL
|
||||
#execute DDL instead of commit
|
||||
create table tab6(c1 int);
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
update_time
|
||||
NULL
|
||||
START TRANSACTION;
|
||||
DELETE FROM tab7;
|
||||
ROLLBACK;
|
||||
SELECT * FROM tab7;
|
||||
c1
|
||||
1
|
||||
SELECT * FROM tab8;
|
||||
c1 c2
|
||||
1 1
|
||||
SELECT table_name,update_time
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
table_name update_time
|
||||
tab7 NULL
|
||||
tab8 NULL
|
||||
DELETE FROM tab7;
|
||||
SELECT * FROM tab7;
|
||||
c1
|
||||
SELECT * FROM tab8;
|
||||
c1 c2
|
||||
SELECT table_name,COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
table_name COUNT(update_time)
|
||||
tab7 1
|
||||
tab8 1
|
||||
#cleanup
|
||||
DROP TRIGGER test_trig;
|
||||
DROP TABLE tab1,tab1u,tab1d,tab1i,tab2,tab3,tab4,tab5,tab6,tab8,tab7;
|
||||
DROP PROCEDURE proc_wl6658;
|
||||
|
|
@ -95,7 +95,7 @@ FLUSH TABLES;
|
|||
|
||||
--echo # Drop the orphaned original table.
|
||||
--disable_query_log
|
||||
eval DROP TABLE `#mysql50#$temp_table_name`;
|
||||
eval DROP TABLE `$temp_table_name`;
|
||||
--enable_query_log
|
||||
|
||||
--echo # Files in datadir after manual recovery.
|
||||
|
|
@ -138,24 +138,27 @@ ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
|
|||
let $temp_table_name = `SELECT SUBSTRING(name,6)
|
||||
FROM information_schema.innodb_sys_tables
|
||||
WHERE name LIKE "test/#sql-ib$orig_table_id%"`;
|
||||
# This second copy is an environment variable for the perl script below.
|
||||
let temp_table_name = $temp_table_name;
|
||||
|
||||
--echo # Manual *.frm recovery begin. The dictionary was not updated
|
||||
--echo # and the files were not renamed. The rebuilt table
|
||||
--echo # was left behind on purpose, to faciliate data recovery.
|
||||
|
||||
let TABLENAME_INC= $MYSQLTEST_VARDIR/tmp/tablename.inc;
|
||||
perl;
|
||||
my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
|
||||
my $target_frm = "$ENV{'datadir'}/test/$ENV{'temp_table_name'}.frm";
|
||||
rename($frm_file[0], $target_frm);
|
||||
die unless open OUT, ">$ENV{TABLENAME_INC}";
|
||||
chdir "$ENV{'datadir'}/test";
|
||||
my @frm_file = map { substr($_, 0, -4) } glob "#sql-*.frm";
|
||||
print OUT 'let $tablename=', $frm_file[0], ';';
|
||||
close OUT or die;
|
||||
EOF
|
||||
source $TABLENAME_INC;
|
||||
remove_file $TABLENAME_INC;
|
||||
|
||||
--echo # Manual recovery end
|
||||
|
||||
--echo # Drop the orphaned rebuilt table.
|
||||
--disable_query_log
|
||||
eval DROP TABLE `#mysql50#$temp_table_name`;
|
||||
eval DROP TABLE `#mysql50#$tablename`;
|
||||
--enable_query_log
|
||||
|
||||
SHOW TABLES;
|
||||
|
|
@ -186,7 +189,6 @@ SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
|
|||
let $orig_table_id = `select table_id from
|
||||
information_schema.innodb_sys_tables where name = 'test/t1'`;
|
||||
|
||||
# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
|
||||
# Write file to make mysql-test-run.pl expect crash
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
#
|
||||
|
|
|
|||
|
|
@ -24,49 +24,30 @@ let datadir= `select @@datadir`;
|
|||
--let $_server_id= `SELECT @@server_id`
|
||||
--let $_expect_file_name=$MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||
|
||||
--echo # Crash the server in ha_innobase::commit_inplace_alter_table()
|
||||
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
|
||||
SET debug='d,innodb_alter_commit_crash_before_commit';
|
||||
SET debug_dbug='+d,innodb_alter_commit_crash_before_commit';
|
||||
|
||||
let $orig_table_id = `SELECT table_id
|
||||
FROM information_schema.innodb_sys_tables
|
||||
WHERE name = 'test/t1'`;
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
--echo # Write file to make mysql-test-run.pl expect crash
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
--echo # Execute the statement that causes the crash
|
||||
--error 2013
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
||||
--echo # Startup the server after the crash
|
||||
|
||||
let TABLENAME_INC= $MYSQLTEST_VARDIR/tmp/tablename.inc;
|
||||
perl;
|
||||
die unless open OUT, ">$ENV{TABLENAME_INC}";
|
||||
chdir "$ENV{'datadir'}/test";
|
||||
my @frm_file = map { substr($_, 0, -4) } glob "#sql-*.frm";
|
||||
print OUT 'let $temp_table_name=', $frm_file[0], ';';
|
||||
close OUT or die;
|
||||
EOF
|
||||
source $TABLENAME_INC;
|
||||
remove_file $TABLENAME_INC;
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
--echo # Read and remember the temporary table name
|
||||
let $temp_table_name = `SELECT SUBSTRING(name,6)
|
||||
FROM information_schema.innodb_sys_tables
|
||||
WHERE name LIKE "test/#sql-ib$orig_table_id%"`;
|
||||
# This second copy is an environment variable for the perl script below.
|
||||
let temp_table_name = $temp_table_name;
|
||||
show create table t1;
|
||||
--echo # Consecutive Alter table does not create same temporary file name
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
||||
--echo # Shutdown the server to allow manual recovery
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--echo # Manual recovery begin. The dictionary was not updated
|
||||
--echo # and the files were not renamed. The rebuilt table
|
||||
--echo # was left behind on purpose, to faciliate data recovery.
|
||||
|
||||
perl;
|
||||
my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
|
||||
my $target_frm = "$ENV{'datadir'}/test/$ENV{'temp_table_name'}.frm";
|
||||
rename($frm_file[0], $target_frm);
|
||||
EOF
|
||||
--echo # Manual recovery end
|
||||
--echo # Startup the server after manual recovery
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
--echo # Drop the orphaned rebuilt table.
|
||||
--disable_query_log
|
||||
eval DROP TABLE `#mysql50#$temp_table_name`;
|
||||
--enable_query_log
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
let $format= `SELECT CASE WHEN @@GLOBAL.innodb_page_size>16384
|
||||
THEN 'DYNAMIC' ELSE 'COMPRESSED' END`;
|
||||
eval CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=$format;
|
||||
INSERT INTO t VALUES(1);
|
||||
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
|
||||
eval ALTER TABLE t ADD e INT, ROW_FORMAT=$format;
|
||||
INSERT INTO t SET a=1;
|
||||
SET @old_instant=
|
||||
(SELECT variable_value FROM information_schema.global_status
|
||||
WHERE variable_name = 'innodb_instant_alter_column');
|
||||
|
|
@ -26,6 +27,9 @@ SHOW CREATE TABLE t;
|
|||
SELECT variable_value-@old_instant instants
|
||||
FROM information_schema.global_status
|
||||
WHERE variable_name = 'innodb_instant_alter_column';
|
||||
SELECT variable_value-@old_instant instants
|
||||
FROM information_schema.global_status
|
||||
WHERE variable_name = 'innodb_instant_alter_column';
|
||||
DROP TABLE t;
|
||||
|
||||
connect analyze, localhost, root;
|
||||
|
|
@ -52,7 +56,7 @@ eval CREATE TABLE t1
|
|||
SPATIAL INDEX(c3)) $engine;
|
||||
|
||||
INSERT INTO t1 (id, c2) values(1,1);
|
||||
SELECT * FROM t1;
|
||||
SELECT id,c2,ST_AsText(c3) c3 FROM t1;
|
||||
|
||||
--enable_info
|
||||
ALTER TABLE t1 ADD COLUMN (
|
||||
|
|
@ -64,7 +68,7 @@ ALTER TABLE t1 ADD INDEX(d3);
|
|||
BEGIN;
|
||||
UPDATE t1 SET d3='';
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1;
|
||||
SELECT id,c2,ST_AsText(c3) c3, d1, d2, d3, d4 FROM t1;
|
||||
INSERT INTO t1 (id) VALUES(2),(3),(4),(5),(6);
|
||||
|
||||
--enable_info
|
||||
|
|
@ -76,7 +80,7 @@ CHANGE d4 dfour TIMESTAMP NOT NULL DEFAULT now();
|
|||
UPDATE t1 SET d3='foo' WHERE id = 2;
|
||||
UPDATE t1 SET d3=DEFAULT WHERE id = 4;
|
||||
INSERT INTO t1 SET id = 7;
|
||||
SELECT * FROM t1;
|
||||
SELECT id,c2,ST_AsText(c3) c3, d1, d2, d3, dfour FROM t1;
|
||||
CHECK TABLE t1;
|
||||
|
||||
# add virtual columns
|
||||
|
|
@ -102,9 +106,9 @@ UPDATE t1 SET d3 = 'xxxxx' WHERE id = 2;
|
|||
# transaction rollback
|
||||
BEGIN;
|
||||
UPDATE t1 SET d3 = 'xxxxx' WHERE id = 3;
|
||||
SELECT * FROM t1 WHERE id = 3;
|
||||
SELECT id, c2, ST_AsText(c3) c3, d1, d2, d3, dfour, e1, e2, e3, d5, d6, d7 FROM t1 WHERE id = 3;
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1 WHERE id = 3;
|
||||
SELECT id, c2, ST_AsText(c3) c3, d1, d2, d3, dfour, e1, e2, e3, d5, d6, d7 FROM t1 WHERE id = 3;
|
||||
|
||||
# NULL to NULL, no change
|
||||
BEGIN;
|
||||
|
|
@ -112,9 +116,9 @@ UPDATE t1 SET d7 = NULL WHERE ID = 5;
|
|||
ROLLBACK;
|
||||
BEGIN;
|
||||
UPDATE t1 SET d7 = NULL, d6 = 10 WHERE id = 5;
|
||||
SELECT * FROM t1 WHERE id = 5;
|
||||
SELECT id, c2, ST_AsText(c3) c3, d1, d2, d3, dfour, e1, e2, e3, d5, d6, d7 FROM t1 WHERE id = 5;
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1 WHERE id = 5;
|
||||
SELECT id, c2, ST_AsText(c3) c3, d1, d2, d3, dfour, e1, e2, e3, d5, d6, d7 FROM t1 WHERE id = 5;
|
||||
|
||||
# add virtual stored columns; not instant
|
||||
--enable_info
|
||||
|
|
@ -124,7 +128,7 @@ ALTER TABLE t1 ADD COLUMN (f1 VARCHAR(20) AS (concat('x', e2)) STORED);
|
|||
ALTER TABLE t1 ADD COLUMN (d8 VARCHAR(20) DEFAULT 'omnopq');
|
||||
--disable_info
|
||||
|
||||
SELECT * FROM t1;
|
||||
SELECT id, c2, ST_AsText(c3) c3, d1, d2, d3, dfour, e1, e2, e3, d5, d6, d7, f1, d8 FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
--enable_info
|
||||
|
|
@ -156,7 +160,7 @@ COMMIT;
|
|||
--enable_info
|
||||
ALTER TABLE t2 ADD COLUMN d1 VARCHAR(2000) DEFAULT REPEAT('asdf',500);
|
||||
--disable_info
|
||||
SELECT * FROM t2;
|
||||
SELECT id, c1, ST_AsText(p) p, d1 FROM t2;
|
||||
|
||||
# inplace update, rollback
|
||||
BEGIN;
|
||||
|
|
@ -202,17 +206,17 @@ eval CREATE TABLE t3
|
|||
SPATIAL INDEX(c3))
|
||||
$engine;
|
||||
INSERT INTO t3(id,c2) VALUES(1,1),(2,2),(3,3);
|
||||
SELECT * FROM t3;
|
||||
SELECT id, c2, ST_AsText(c3) c3 FROM t3;
|
||||
--enable_info
|
||||
ALTER TABLE t3 ADD COLUMN
|
||||
(c4 DATETIME DEFAULT current_timestamp(),
|
||||
c5 TIMESTAMP NOT NULL DEFAULT current_timestamp(),
|
||||
c6 POINT);
|
||||
SELECT * FROM t3;
|
||||
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6 FROM t3;
|
||||
ALTER TABLE t3 ADD COLUMN c7 TIME NOT NULL DEFAULT current_timestamp();
|
||||
ALTER TABLE t3 ADD COLUMN c8 DATE NOT NULL DEFAULT current_timestamp();
|
||||
--disable_info
|
||||
SELECT * FROM t3;
|
||||
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8 FROM t3;
|
||||
|
||||
--enable_info
|
||||
ALTER TABLE t3 ADD COLUMN t TEXT CHARSET utf8
|
||||
|
|
@ -226,7 +230,7 @@ ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
|
|||
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
|
||||
--disable_info
|
||||
INSERT INTO t3 SET id=5, c2=9;
|
||||
SELECT * FROM t3;
|
||||
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8, phrase, b FROM t3;
|
||||
--enable_info
|
||||
ALTER TABLE t3 DROP c3, DROP c7;
|
||||
--disable_info
|
||||
|
|
|
|||
232
mysql-test/suite/innodb/t/update_time_wl6658.test
Normal file
232
mysql-test/suite/innodb/t/update_time_wl6658.test
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
###################################################################
|
||||
#Testing functionality of the WL6658
|
||||
#case1: begin work with INSERT with Triggers
|
||||
#case2: (tab1u) begin transaction with UPDATE
|
||||
#case3: (tab1d) begin transaction with DELETE
|
||||
#case4: (tab1i) Rollback & INSERT
|
||||
#case5: (tab2) partitioned table and procedures
|
||||
#case6: (tab2) SAVEPOINT
|
||||
#case7: (tab7,tab8) pk-fk with ON DELETE CASCADE
|
||||
###################################################################
|
||||
--source include/no_valgrind_without_big.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_partition.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
CREATE TABLE tab1(c1 int,c2 varchar(30), c3 BLOB) ENGINE=InnoDB;
|
||||
CREATE TABLE tab1u LIKE tab1;
|
||||
CREATE TABLE tab1d LIKE tab1;
|
||||
CREATE TABLE tab1i LIKE tab1;
|
||||
CREATE TABLE tab3(c1 int,c2 varchar(30)) ENGINE=InnoDB;
|
||||
CREATE TABLE tab4(c1 int,c2 varchar(30)) ENGINE=InnoDB;
|
||||
CREATE TABLE tab5(c1 int,c2 varchar(30)) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO tab1u VALUES(1,'Testing the wl6658','Testing the wl6658');
|
||||
INSERT INTO tab1d VALUES(1,'Updated','Updated');
|
||||
INSERT INTO tab4 VALUES(1,'Test for Update');
|
||||
INSERT INTO tab5 VALUES(1,'Test for Delete');
|
||||
|
||||
delimiter |;
|
||||
|
||||
CREATE TRIGGER test_trig BEFORE INSERT ON tab1
|
||||
FOR EACH ROW BEGIN
|
||||
INSERT INTO tab3 VALUES(1,'Inserted From Trigger');
|
||||
UPDATE tab4 SET c2='Updated from Trigger' WHERE c1=1;
|
||||
DELETE FROM tab5;
|
||||
END |
|
||||
|
||||
delimiter ;|
|
||||
|
||||
CREATE TABLE tab2(
|
||||
id INT NOT NULL,
|
||||
store_name VARCHAR(30),
|
||||
parts VARCHAR(30),
|
||||
store_id INT
|
||||
) ENGINE=InnoDB
|
||||
PARTITION BY LIST(store_id) (
|
||||
PARTITION pNorth VALUES IN (10,20,30),
|
||||
PARTITION pEast VALUES IN (40,50,60),
|
||||
PARTITION pWest VALUES IN (70,80,100)
|
||||
);
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
|
||||
delimiter |;
|
||||
|
||||
CREATE PROCEDURE proc_wl6658()
|
||||
BEGIN
|
||||
INSERT INTO tab2 VALUES(1,'ORACLE','NUTT',10);
|
||||
INSERT INTO tab2 VALUES(2,'HUAWEI','BOLT',40);
|
||||
COMMIT;
|
||||
END |
|
||||
|
||||
delimiter ;|
|
||||
|
||||
CALL proc_wl6658;
|
||||
|
||||
SELECT * FROM tab2 ORDER BY id,store_id;
|
||||
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
|
||||
TRUNCATE TABLE tab2;
|
||||
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
|
||||
CREATE TABLE tab7(c1 INT NOT NULL, PRIMARY KEY (c1)) ENGINE=INNODB;
|
||||
|
||||
CREATE TABLE tab8(c1 INT PRIMARY KEY,c2 INT,
|
||||
FOREIGN KEY (c2) REFERENCES tab7(c1) ON DELETE CASCADE )
|
||||
ENGINE=INNODB;
|
||||
|
||||
SELECT table_name,update_time
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
|
||||
INSERT INTO tab7 VALUES(1);
|
||||
|
||||
INSERT INTO tab8 VALUES(1,1);
|
||||
|
||||
SELECT table_name,COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
|
||||
--echo #restart the server
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SELECT table_name,update_time
|
||||
FROM information_schema.tables
|
||||
WHERE table_name IN ('tab1','tab2','tab3','tab4','tab5','tab7','tab8')
|
||||
ORDER BY table_name;
|
||||
|
||||
--echo #case1:
|
||||
|
||||
BEGIN WORK;
|
||||
|
||||
INSERT INTO tab1
|
||||
VALUES(1,'Testing the wl6658', 'Testing the wl6658');
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1';
|
||||
|
||||
COMMIT;
|
||||
|
||||
SELECT * FROM tab1;
|
||||
SELECT * FROM tab3;
|
||||
SELECT * FROM tab4;
|
||||
SELECT * FROM tab5;
|
||||
|
||||
SELECT table_name,COUNT(update_time)
|
||||
FROM information_schema.tables
|
||||
WHERE table_name IN ('tab1','tab3','tab4','tab5')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
|
||||
--echo Testcase with UPDATE stmt and transaction
|
||||
|
||||
SELECT * FROM tab1u;
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1u';
|
||||
|
||||
--echo #case2:
|
||||
START TRANSACTION;
|
||||
|
||||
UPDATE tab1u SET c2='Updated',c3='Updated' WHERE c1=1;
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1u';
|
||||
|
||||
COMMIT;
|
||||
|
||||
SELECT * FROM tab1u;
|
||||
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab1u';
|
||||
|
||||
SELECT * FROM tab1d;
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1d';
|
||||
|
||||
--echo #case3:
|
||||
START TRANSACTION;
|
||||
|
||||
DELETE FROM tab1d;
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1d';
|
||||
|
||||
COMMIT;
|
||||
|
||||
SELECT * FROM tab1d;
|
||||
|
||||
SELECT COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name='tab1d';
|
||||
|
||||
SELECT * FROM tab1i;
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1i';
|
||||
|
||||
--echo #case4:
|
||||
START TRANSACTION;
|
||||
|
||||
INSERT INTO tab1i
|
||||
VALUES(1,'Testing the wl6658', 'Testing the wl6658');
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1i';
|
||||
|
||||
ROLLBACK;
|
||||
|
||||
SELECT * FROM tab1i;
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab1i';
|
||||
|
||||
BEGIN WORK;
|
||||
DELETE FROM tab1i;
|
||||
SAVEPOINT A;
|
||||
INSERT INTO tab2 VALUES(1,'Oracle','NUTT',10);
|
||||
INSERT INTO tab2 VALUES(2,'HUAWEI','BOLT',40);
|
||||
SAVEPOINT B;
|
||||
INSERT INTO tab2 VALUES(3,'IBM','NAIL',70);
|
||||
SAVEPOINT C;
|
||||
ROLLBACK to A;
|
||||
|
||||
SELECT * FROM tab2;
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
|
||||
--echo #execute DDL instead of commit
|
||||
create table tab6(c1 int);
|
||||
|
||||
SELECT update_time
|
||||
FROM information_schema.tables WHERE table_name='tab2';
|
||||
|
||||
START TRANSACTION;
|
||||
DELETE FROM tab7;
|
||||
ROLLBACK;
|
||||
|
||||
SELECT * FROM tab7;
|
||||
SELECT * FROM tab8;
|
||||
|
||||
SELECT table_name,update_time
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
|
||||
DELETE FROM tab7;
|
||||
SELECT * FROM tab7;
|
||||
SELECT * FROM tab8;
|
||||
|
||||
SELECT table_name,COUNT(update_time)
|
||||
FROM information_schema.tables WHERE table_name IN ('tab7','tab8')
|
||||
GROUP BY table_name ORDER BY table_name;
|
||||
|
||||
--echo #cleanup
|
||||
DROP TRIGGER test_trig;
|
||||
DROP TABLE tab1,tab1u,tab1d,tab1i,tab2,tab3,tab4,tab5,tab6,tab8,tab7;
|
||||
DROP PROCEDURE proc_wl6658;
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -220,6 +220,20 @@ NUMERIC_BLOCK_SIZE NULL
|
|||
ENUM_VALUE_LIST OFF,ON
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME BINLOG_FILE_CACHE_SIZE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 16384
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16384
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The size of file cache for the binary log
|
||||
NUMERIC_MIN_VALUE 8192
|
||||
NUMERIC_MAX_VALUE 18446744073709551615
|
||||
NUMERIC_BLOCK_SIZE 4096
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME BINLOG_FORMAT
|
||||
SESSION_VALUE MIXED
|
||||
GLOBAL_VALUE MIXED
|
||||
|
|
@ -4112,6 +4126,48 @@ NUMERIC_BLOCK_SIZE 1
|
|||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TCP_KEEPALIVE_INTERVAL
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received.If set to 0, system dependent default is used.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TCP_KEEPALIVE_PROBES
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT The number of unacknowledged probes to send before considering the connection dead and notifying the application layer.If set to 0, system dependent default is used.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TCP_KEEPALIVE_TIME
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME THREAD_CACHE_SIZE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 151
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -220,6 +220,20 @@ NUMERIC_BLOCK_SIZE NULL
|
|||
ENUM_VALUE_LIST OFF,ON
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME BINLOG_FILE_CACHE_SIZE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 16384
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16384
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT The size of file cache for the binary log
|
||||
NUMERIC_MIN_VALUE 8192
|
||||
NUMERIC_MAX_VALUE 18446744073709551615
|
||||
NUMERIC_BLOCK_SIZE 4096
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME BINLOG_FORMAT
|
||||
SESSION_VALUE MIXED
|
||||
GLOBAL_VALUE MIXED
|
||||
|
|
@ -4910,6 +4924,48 @@ NUMERIC_BLOCK_SIZE 1
|
|||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TCP_KEEPALIVE_INTERVAL
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received.If set to 0, system dependent default is used.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TCP_KEEPALIVE_PROBES
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT The number of unacknowledged probes to send before considering the connection dead and notifying the application layer.If set to 0, system dependent default is used.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME TCP_KEEPALIVE_TIME
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2147483
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME THREAD_CACHE_SIZE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 151
|
||||
|
|
|
|||
9
mysql-test/suite/sys_vars/r/tcp_keepalive_time.result
Normal file
9
mysql-test/suite/sys_vars/r/tcp_keepalive_time.result
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
set global tcp_keepalive_time = 1;
|
||||
set global tcp_keepalive_interval =1;
|
||||
set global tcp_keepalive_probes=1;
|
||||
connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
set global tcp_keepalive_time= default;
|
||||
set global tcp_keepalive_interval= default;
|
||||
set global tcp_keepalive_probes=default;
|
||||
11
mysql-test/suite/sys_vars/t/tcp_keepalive_time.test
Normal file
11
mysql-test/suite/sys_vars/t/tcp_keepalive_time.test
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--source include/not_embedded.inc
|
||||
# A smoke test for TCP keepalive options
|
||||
set global tcp_keepalive_time = 1;
|
||||
set global tcp_keepalive_interval =1;
|
||||
set global tcp_keepalive_probes=1;
|
||||
connect(con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
|
||||
disconnect con1;
|
||||
connection default;
|
||||
set global tcp_keepalive_time= default;
|
||||
set global tcp_keepalive_interval= default;
|
||||
set global tcp_keepalive_probes=default;
|
||||
|
|
@ -19,10 +19,6 @@
|
|||
#include <errno.h>
|
||||
#include "mysys_err.h"
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
extern int getosreldate(void);
|
||||
#endif
|
||||
|
||||
static void make_ftype(char * to,int flag);
|
||||
|
||||
/*
|
||||
|
|
@ -130,52 +126,6 @@ static FILE *my_win_freopen(const char *path, const char *mode, FILE *stream)
|
|||
return stream;
|
||||
}
|
||||
|
||||
#elif defined(__FreeBSD__)
|
||||
|
||||
/* No close operation hook. */
|
||||
|
||||
static int no_close(void *cookie __attribute__((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
A hack around a race condition in the implementation of freopen.
|
||||
|
||||
The race condition stems from the fact that the current fd of
|
||||
the stream is closed before its number is used to duplicate the
|
||||
new file descriptor. This defeats the desired atomicity of the
|
||||
close and duplicate of dup2().
|
||||
|
||||
See PR number 79887 for reference:
|
||||
http://www.freebsd.org/cgi/query-pr.cgi?pr=79887
|
||||
*/
|
||||
|
||||
static FILE *my_freebsd_freopen(const char *path, const char *mode, FILE *stream)
|
||||
{
|
||||
int old_fd;
|
||||
FILE *result;
|
||||
|
||||
flockfile(stream);
|
||||
|
||||
old_fd= fileno(stream);
|
||||
|
||||
/* Use a no operation close hook to avoid having the fd closed. */
|
||||
stream->_close= no_close;
|
||||
|
||||
/* Relies on the implicit dup2 to close old_fd. */
|
||||
result= freopen(path, mode, stream);
|
||||
|
||||
/* If successful, the _close hook was replaced. */
|
||||
|
||||
if (result == NULL)
|
||||
close(old_fd);
|
||||
else
|
||||
funlockfile(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -199,16 +149,6 @@ FILE *my_freopen(const char *path, const char *mode, FILE *stream)
|
|||
|
||||
#if defined(_WIN32)
|
||||
result= my_win_freopen(path, mode, stream);
|
||||
#elif defined(__FreeBSD__)
|
||||
/*
|
||||
XXX: Once the fix is ported to the stable releases, this should
|
||||
be dependent upon the specific FreeBSD versions. Check at:
|
||||
http://www.freebsd.org/cgi/query-pr.cgi?pr=79887
|
||||
*/
|
||||
if (getosreldate() > 900027)
|
||||
result= freopen(path, mode, stream);
|
||||
else
|
||||
result= my_freebsd_freopen(path, mode, stream);
|
||||
#else
|
||||
result= freopen(path, mode, stream);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ struct show_table_authors_st show_table_authors[]= {
|
|||
"Prepared statements (4.1), Cursors (5.0), GET_LOCK (10.0)" },
|
||||
{ "Ian Gilfillan", "South Africa", "MariaDB documentation"},
|
||||
{ "Federico Razolli", "Italy", "MariaDB documentation Italian translation"},
|
||||
{ "Vinchen", "Shenzhen, China", "Instant ADD Column for InnoDB, Spider engine optimization, from Tencent Game DBA Team" },
|
||||
{ "Willhan", "Shenzhen, China", "Big Column Compression, Spider engine optimization, from Tencent Game DBA Team" },
|
||||
|
||||
/* People working on MySQL code base (not NDB) */
|
||||
{ "Guilhem Bichot", "Bordeaux, France", "Replication (since 4.0)" },
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ static int read_string(File file, uchar**to, size_t length)
|
|||
{
|
||||
DBUG_ENTER("read_string");
|
||||
|
||||
my_free(*to);
|
||||
/* This can't use MY_THREAD_SPECIFIC as it's used on server start */
|
||||
if (!(*to= (uchar*) my_malloc(length+1,MYF(MY_WME))) ||
|
||||
mysql_file_read(file, *to, length, MYF(MY_NABP)))
|
||||
{
|
||||
|
|
@ -51,7 +51,7 @@ static int read_string(File file, uchar**to, size_t length)
|
|||
|
||||
@param[out] is_sequence 1 if table is a SEQUENCE, 0 otherwise
|
||||
|
||||
@retval TABLE_TYPE_UNKNOWN error
|
||||
@retval TABLE_TYPE_UNKNOWN error - file can't be opened
|
||||
@retval TABLE_TYPE_NORMAL table
|
||||
@retval TABLE_TYPE_SEQUENCE sequence table
|
||||
@retval TABLE_TYPE_VIEW view
|
||||
|
|
@ -72,33 +72,36 @@ Table_type dd_frm_type(THD *thd, char *path, LEX_CSTRING *engine_name,
|
|||
if ((file= mysql_file_open(key_file_frm, path, O_RDONLY | O_SHARE, MYF(0)))
|
||||
< 0)
|
||||
DBUG_RETURN(TABLE_TYPE_UNKNOWN);
|
||||
error= mysql_file_read(file, (uchar*) header, sizeof(header), MYF(MY_NABP));
|
||||
|
||||
if (error)
|
||||
/*
|
||||
We return TABLE_TYPE_NORMAL if we can open the .frm file. This allows us
|
||||
to drop a bad .frm file with DROP TABLE
|
||||
*/
|
||||
type= TABLE_TYPE_NORMAL;
|
||||
|
||||
/*
|
||||
Initialize engine name in case we are not able to find it out
|
||||
The cast is safe, as engine_name->str points to a usable buffer.
|
||||
*/
|
||||
if (engine_name)
|
||||
{
|
||||
engine_name->length= 0;
|
||||
((char*) (engine_name->str))[0]= 0;
|
||||
}
|
||||
|
||||
if ((error= mysql_file_read(file, (uchar*) header, sizeof(header), MYF(MY_NABP))))
|
||||
goto err;
|
||||
|
||||
if (!strncmp((char*) header, "TYPE=VIEW\n", 10))
|
||||
{
|
||||
type= TABLE_TYPE_VIEW;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
We return TABLE_TYPE_NORMAL if we can read the .frm file. This allows us
|
||||
to drop a bad .frm file with DROP TABLE
|
||||
*/
|
||||
type= TABLE_TYPE_NORMAL;
|
||||
|
||||
/* engine_name is 0 if we only want to know if table is view or not */
|
||||
if (!engine_name)
|
||||
goto err;
|
||||
|
||||
/*
|
||||
Initialize engine name in case we are not able to find it out
|
||||
The cast is safe, as engine_name->str points to a usable buffer.
|
||||
*/
|
||||
engine_name->length= 0;
|
||||
((char*) (engine_name->str))[0]= 0;
|
||||
|
||||
if (!is_binary_frm_header(header))
|
||||
goto err;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,6 @@
|
|||
#include "mariadb.h"
|
||||
#include "sql_priv.h"
|
||||
#include "filesort.h"
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h> /* for macro offsetof */
|
||||
#endif
|
||||
#include <m_ctype.h>
|
||||
#include "sql_sort.h"
|
||||
#include "probes_mysql.h"
|
||||
|
|
|
|||
|
|
@ -682,7 +682,7 @@ int ha_partition::create(const char *name, TABLE *table_arg,
|
|||
handler **file, **abort_file;
|
||||
DBUG_ENTER("ha_partition::create");
|
||||
|
||||
DBUG_ASSERT(*fn_rext((char*)name) == '\0');
|
||||
DBUG_ASSERT(!fn_frm_ext(name));
|
||||
|
||||
/* Not allowed to create temporary partitioned tables */
|
||||
if (create_info && create_info->tmp_table())
|
||||
|
|
|
|||
47
sql/item.cc
47
sql/item.cc
|
|
@ -78,6 +78,12 @@ inline void set_max_sum_func_level(THD *thd, SELECT_LEX *select)
|
|||
select->nest_level - 1);
|
||||
}
|
||||
|
||||
|
||||
MEM_ROOT *get_thd_memroot(THD *thd)
|
||||
{
|
||||
return thd->mem_root;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
** Item functions
|
||||
*****************************************************************************/
|
||||
|
|
@ -1261,7 +1267,7 @@ Item *Item::safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
|
|||
if (!needs_charset_converter(tocs))
|
||||
return this;
|
||||
Item_func_conv_charset *conv= new (thd->mem_root) Item_func_conv_charset(thd, this, tocs, 1);
|
||||
return conv->safe ? conv : NULL;
|
||||
return conv && conv->safe ? conv : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2700,15 +2706,15 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
|
|||
0 if an error occured
|
||||
*/
|
||||
|
||||
Item* Item_func_or_sum::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item* Item_func_or_sum::build_clone(THD *thd)
|
||||
{
|
||||
Item_func_or_sum *copy= (Item_func_or_sum *) get_copy(thd, mem_root);
|
||||
Item_func_or_sum *copy= (Item_func_or_sum *) get_copy(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
if (arg_count > 2)
|
||||
{
|
||||
copy->args=
|
||||
(Item**) alloc_root(mem_root, sizeof(Item*) * arg_count);
|
||||
(Item**) alloc_root(thd->mem_root, sizeof(Item*) * arg_count);
|
||||
if (!copy->args)
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2718,7 +2724,7 @@ Item* Item_func_or_sum::build_clone(THD *thd, MEM_ROOT *mem_root)
|
|||
|
||||
for (uint i= 0; i < arg_count; i++)
|
||||
{
|
||||
Item *arg_clone= args[i]->build_clone(thd, mem_root);
|
||||
Item *arg_clone= args[i]->build_clone(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
copy->args[i]= arg_clone;
|
||||
|
|
@ -2743,19 +2749,13 @@ Item* Item_func_or_sum::build_clone(THD *thd, MEM_ROOT *mem_root)
|
|||
0 if an error occured
|
||||
*/
|
||||
|
||||
Item* Item_ref::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item* Item_ref::build_clone(THD *thd)
|
||||
{
|
||||
Item_ref *copy= (Item_ref *) get_copy(thd, mem_root);
|
||||
if (!copy)
|
||||
Item_ref *copy= (Item_ref *) get_copy(thd);
|
||||
if (!copy ||
|
||||
!(copy->ref= (Item**) alloc_root(thd->mem_root, sizeof(Item*))) ||
|
||||
!(*copy->ref= (* ref)->build_clone(thd)))
|
||||
return 0;
|
||||
copy->ref=
|
||||
(Item**) alloc_root(mem_root, sizeof(Item*));
|
||||
if (!copy->ref)
|
||||
return 0;
|
||||
Item *item_clone= (* ref)->build_clone(thd, mem_root);
|
||||
if (!item_clone)
|
||||
return 0;
|
||||
*copy->ref= item_clone;
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
|
@ -3237,6 +3237,11 @@ table_map Item_field::all_used_tables() const
|
|||
return (get_depended_from() ? OUTER_REF_TABLE_BIT : field->table->map);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@Note thd->fatal_error can be set in case of OOM
|
||||
*/
|
||||
|
||||
void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref,
|
||||
bool merge)
|
||||
{
|
||||
|
|
@ -3296,6 +3301,8 @@ void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref,
|
|||
}
|
||||
|
||||
Name_resolution_context *ctx= new Name_resolution_context();
|
||||
if (!ctx)
|
||||
return; // Fatal error set
|
||||
if (context->select_lex == new_parent)
|
||||
{
|
||||
/*
|
||||
|
|
@ -7356,7 +7363,7 @@ Item *Item_field::derived_field_transformer_for_where(THD *thd, uchar *arg)
|
|||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Item *producing_item= find_producing_item(this, sel);
|
||||
if (producing_item)
|
||||
return producing_item->build_clone(thd, thd->mem_root);
|
||||
return producing_item->build_clone(thd);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -7368,7 +7375,7 @@ Item *Item_direct_view_ref::derived_field_transformer_for_where(THD *thd,
|
|||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Item *producing_item= find_producing_item(this, sel);
|
||||
DBUG_ASSERT (producing_item != NULL);
|
||||
return producing_item->build_clone(thd, thd->mem_root);
|
||||
return producing_item->build_clone(thd);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
|
@ -7414,7 +7421,7 @@ Item *Item_field::derived_grouping_field_transformer_for_where(THD *thd,
|
|||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
|
||||
if (gr_field)
|
||||
return gr_field->producing_item->build_clone(thd, thd->mem_root);
|
||||
return gr_field->producing_item->build_clone(thd);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -7427,7 +7434,7 @@ Item_direct_view_ref::derived_grouping_field_transformer_for_where(THD *thd,
|
|||
return this;
|
||||
st_select_lex *sel= (st_select_lex *)arg;
|
||||
Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
|
||||
return gr_field->producing_item->build_clone(thd, thd->mem_root);
|
||||
return gr_field->producing_item->build_clone(thd);
|
||||
}
|
||||
|
||||
void Item_field::print(String *str, enum_query_type query_type)
|
||||
|
|
|
|||
165
sql/item.h
165
sql/item.h
|
|
@ -128,8 +128,6 @@ enum precedence {
|
|||
HIGHEST_PRECEDENCE
|
||||
};
|
||||
|
||||
typedef Bounds_checked_array<Item*> Ref_ptr_array;
|
||||
|
||||
bool mark_unsupported_function(const char *where, void *store, uint result);
|
||||
|
||||
/* convenience helper for mark_unsupported_function() above */
|
||||
|
|
@ -1222,7 +1220,7 @@ public:
|
|||
virtual bool basic_const_item() const { return 0; }
|
||||
/* cloning of constant items (0 if it is not const) */
|
||||
virtual Item *clone_item(THD *thd) { return 0; }
|
||||
virtual Item* build_clone(THD *thd, MEM_ROOT *mem_root) { return get_copy(thd, mem_root); }
|
||||
virtual Item* build_clone(THD *thd) { return get_copy(thd); }
|
||||
virtual cond_result eq_cmp_result() const { return COND_OK; }
|
||||
inline uint float_length(uint decimals_par) const
|
||||
{ return decimals < FLOATING_POINT_DECIMALS ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
|
||||
|
|
@ -1692,7 +1690,7 @@ public:
|
|||
virtual bool set_fields_as_dependent_processor(void *arg) { return 0; }
|
||||
/*============== End of Item processor list ======================*/
|
||||
|
||||
virtual Item *get_copy(THD *thd, MEM_ROOT *mem_root)=0;
|
||||
virtual Item *get_copy(THD *thd)=0;
|
||||
|
||||
bool cache_const_expr_analyzer(uchar **arg);
|
||||
Item* cache_const_expr_transformer(THD *thd, uchar *arg);
|
||||
|
|
@ -1968,11 +1966,14 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
MEM_ROOT *get_thd_memroot(THD *thd);
|
||||
|
||||
template <class T>
|
||||
inline Item* get_item_copy (THD *thd, MEM_ROOT *mem_root, T* item)
|
||||
inline Item* get_item_copy (THD *thd, T* item)
|
||||
{
|
||||
Item *copy= new (mem_root) T(*item);
|
||||
copy->register_in(thd);
|
||||
Item *copy= new (get_thd_memroot(thd)) T(*item);
|
||||
if (copy)
|
||||
copy->register_in(thd);
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
|
@ -2403,7 +2404,7 @@ public:
|
|||
|
||||
bool append_for_log(THD *thd, String *str);
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
/*
|
||||
Override the inherited create_field_for_create_select(),
|
||||
|
|
@ -2531,7 +2532,7 @@ public:
|
|||
purposes.
|
||||
*/
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
private:
|
||||
uint m_case_expr_id;
|
||||
|
|
@ -2601,8 +2602,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function("name_const()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_name_const>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_name_const>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_num: public Item_basic_constant
|
||||
|
|
@ -2738,8 +2739,8 @@ public:
|
|||
const Type_handler *handler= field->type_handler();
|
||||
return handler->type_handler_for_item_field();
|
||||
}
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_ident_for_show>(thd, mem_root, this); }
|
||||
Item* get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_ident_for_show>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2929,8 +2930,8 @@ public:
|
|||
bool cleanup_excluding_const_fields_processor(void *arg)
|
||||
{ return field && const_item() ? 0 : cleanup_processor(arg); }
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_field>(thd, this); }
|
||||
bool is_outer_field() const
|
||||
{
|
||||
DBUG_ASSERT(fixed);
|
||||
|
|
@ -2958,8 +2959,8 @@ public:
|
|||
:Item_field(thd, field),
|
||||
Item_args()
|
||||
{ }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_field_row>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_field_row>(thd, this); }
|
||||
|
||||
const Type_handler *type_handler() const { return &type_handler_row; }
|
||||
uint cols() const { return arg_count; }
|
||||
|
|
@ -3054,8 +3055,8 @@ public:
|
|||
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_null>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_null>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_null_result :public Item_null
|
||||
|
|
@ -3329,7 +3330,7 @@ public:
|
|||
|
||||
bool append_for_log(THD *thd, String *str);
|
||||
bool check_vcol_func_processor(void *int_arg) {return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
private:
|
||||
void invalid_default_param() const;
|
||||
|
|
@ -3399,8 +3400,8 @@ public:
|
|||
{ return (uint) (max_length - MY_TEST(value < 0)); }
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
{ return int_eq(value, item); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3432,8 +3433,8 @@ public:
|
|||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *neg(THD *thd);
|
||||
uint decimal_precision() const { return max_length; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_uint>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_uint>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3479,8 +3480,8 @@ public:
|
|||
uint decimal_precision() const { return decimal_value.precision(); }
|
||||
bool eq(const Item *, bool binary_cmp) const;
|
||||
void set_decimal_value(my_decimal *value_par);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3530,8 +3531,8 @@ public:
|
|||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
{ return real_eq(value, item); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3721,8 +3722,8 @@ public:
|
|||
return MYSQL_TYPE_STRING; // Not a temporal literal
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_string>(thd, this); }
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -3976,8 +3977,8 @@ public:
|
|||
return &type_handler_longlong;
|
||||
}
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_hex_hybrid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_hex_hybrid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4017,8 +4018,8 @@ public:
|
|||
collation.collation);
|
||||
}
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_hex_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_hex_string>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4105,8 +4106,8 @@ public:
|
|||
void print(String *str, enum_query_type query_type);
|
||||
Item *clone_item(THD *thd);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_date_literal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_date_literal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4126,8 +4127,8 @@ public:
|
|||
void print(String *str, enum_query_type query_type);
|
||||
Item *clone_item(THD *thd);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_time_literal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_time_literal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4149,8 +4150,8 @@ public:
|
|||
void print(String *str, enum_query_type query_type);
|
||||
Item *clone_item(THD *thd);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_datetime_literal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_datetime_literal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4387,7 +4388,7 @@ public:
|
|||
virtual void fix_length_and_dec()= 0;
|
||||
bool const_item() const { return const_item_cache; }
|
||||
table_map used_tables() const { return used_tables_cache; }
|
||||
Item* build_clone(THD *thd, MEM_ROOT *mem_root);
|
||||
Item* build_clone(THD *thd);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4570,7 +4571,7 @@ public:
|
|||
return (*ref)->is_outer_field();
|
||||
}
|
||||
|
||||
Item* build_clone(THD *thd, MEM_ROOT *mem_root);
|
||||
Item* build_clone(THD *thd);
|
||||
|
||||
/**
|
||||
Checks if the item tree that ref points to contains a subquery.
|
||||
|
|
@ -4579,8 +4580,8 @@ public:
|
|||
{
|
||||
return (*ref)->has_subquery();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_ref>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_ref>(thd, this); }
|
||||
bool excl_dep_on_table(table_map tab_map)
|
||||
{
|
||||
table_map used= used_tables();
|
||||
|
|
@ -4654,8 +4655,8 @@ public:
|
|||
bool is_null();
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
virtual Ref_Type ref_type() { return DIRECT_REF; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_direct_ref>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_direct_ref>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4818,9 +4819,9 @@ public:
|
|||
{
|
||||
return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_wrapper>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_wrapper>(thd, this); }
|
||||
Item *build_clone(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -4988,8 +4989,8 @@ public:
|
|||
item_equal= NULL;
|
||||
Item_direct_ref::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_direct_view_ref>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_direct_view_ref>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5082,8 +5083,8 @@ public:
|
|||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
table_map used_tables() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_ref_null_helper>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_ref_null_helper>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -5246,8 +5247,8 @@ public:
|
|||
longlong val_int();
|
||||
void copy();
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_string>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5270,8 +5271,8 @@ public:
|
|||
return null_value ? 0 : cached_value;
|
||||
}
|
||||
virtual void copy();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5288,8 +5289,8 @@ public:
|
|||
{
|
||||
return null_value ? 0.0 : (double) (ulonglong) cached_value;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_uint>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_uint>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5316,8 +5317,8 @@ public:
|
|||
cached_value= item->val_real();
|
||||
null_value= item->null_value;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5337,8 +5338,8 @@ public:
|
|||
double val_real();
|
||||
longlong val_int();
|
||||
void copy();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_copy_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_copy_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5832,8 +5833,8 @@ public:
|
|||
bool cache_value();
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5868,8 +5869,8 @@ public:
|
|||
Item_cache_time(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_time2) { }
|
||||
bool cache_value();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_time>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_time>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5878,8 +5879,8 @@ class Item_cache_datetime: public Item_cache_temporal
|
|||
public:
|
||||
Item_cache_datetime(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_datetime2) { }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_datetime>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_datetime>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5888,8 +5889,8 @@ class Item_cache_date: public Item_cache_temporal
|
|||
public:
|
||||
Item_cache_date(THD *thd)
|
||||
:Item_cache_temporal(thd, &type_handler_newdate) { }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_date>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_date>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5906,8 +5907,8 @@ public:
|
|||
my_decimal *val_decimal(my_decimal *);
|
||||
bool cache_value();
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_real>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_real>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5924,8 +5925,8 @@ public:
|
|||
my_decimal *val_decimal(my_decimal *);
|
||||
bool cache_value();
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5952,8 +5953,8 @@ public:
|
|||
int save_in_field(Field *field, bool no_conversions);
|
||||
bool cache_value();
|
||||
Item *convert_to_basic_const_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_str>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_str>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5977,8 +5978,8 @@ public:
|
|||
*/
|
||||
return Item::safe_charset_converter(thd, tocs);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_str_for_nullif>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_str_for_nullif>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -6048,8 +6049,8 @@ public:
|
|||
}
|
||||
bool cache_value();
|
||||
virtual void set_null();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cache_row>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cache_row>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -6142,7 +6143,7 @@ public:
|
|||
{
|
||||
Type_geometry_attributes::set_geometry_type(type);
|
||||
}
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
|
||||
private:
|
||||
uint m_flags;
|
||||
|
|
|
|||
|
|
@ -4940,20 +4940,20 @@ void Item_cond::neg_arguments(THD *thd)
|
|||
0 if an error occured
|
||||
*/
|
||||
|
||||
Item *Item_cond::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *Item_cond::build_clone(THD *thd)
|
||||
{
|
||||
List_iterator_fast<Item> li(list);
|
||||
Item *item;
|
||||
Item_cond *copy= (Item_cond *) get_copy(thd, mem_root);
|
||||
Item_cond *copy= (Item_cond *) get_copy(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
copy->list.empty();
|
||||
while ((item= li++))
|
||||
{
|
||||
Item *arg_clone= item->build_clone(thd, mem_root);
|
||||
Item *arg_clone= item->build_clone(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
if (copy->list.push_back(arg_clone, mem_root))
|
||||
if (copy->list.push_back(arg_clone, thd->mem_root))
|
||||
return 0;
|
||||
}
|
||||
return copy;
|
||||
|
|
|
|||
|
|
@ -268,8 +268,8 @@ public:
|
|||
Item_func_istrue(THD *thd, Item *a): Item_func_truth(thd, a, true, true) {}
|
||||
~Item_func_istrue() {}
|
||||
virtual const char* func_name() const { return "istrue"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_istrue>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_istrue>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -284,8 +284,8 @@ public:
|
|||
Item_func_truth(thd, a, true, false) {}
|
||||
~Item_func_isnottrue() {}
|
||||
virtual const char* func_name() const { return "isnottrue"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isnottrue>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isnottrue>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -299,8 +299,8 @@ public:
|
|||
Item_func_isfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, true) {}
|
||||
~Item_func_isfalse() {}
|
||||
virtual const char* func_name() const { return "isfalse"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isfalse>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isfalse>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -315,8 +315,8 @@ public:
|
|||
Item_func_truth(thd, a, false, false) {}
|
||||
~Item_func_isnotfalse() {}
|
||||
virtual const char* func_name() const { return "isnotfalse"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isnotfalse>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isnotfalse>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -378,8 +378,8 @@ public:
|
|||
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
|
||||
bool invisible_mode();
|
||||
void reset_cache() { cache= NULL; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_in_optimizer>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_in_optimizer>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -539,10 +539,10 @@ public:
|
|||
return add_key_fields_optimize_op(join, key_fields, and_level,
|
||||
usable_tables, sargables, false);
|
||||
}
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *build_clone(THD *thd)
|
||||
{
|
||||
Item_bool_rowready_func2 *clone=
|
||||
(Item_bool_rowready_func2 *) Item_func::build_clone(thd, mem_root);
|
||||
(Item_bool_rowready_func2 *) Item_func::build_clone(thd);
|
||||
if (clone)
|
||||
{
|
||||
clone->cmp.comparators= 0;
|
||||
|
|
@ -573,8 +573,8 @@ public:
|
|||
Item_args::propagate_equal_fields(thd, Context_boolean(), cond);
|
||||
return this;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xor>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xor>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_not :public Item_bool_func
|
||||
|
|
@ -592,8 +592,8 @@ public:
|
|||
Item *neg_transformer(THD *thd);
|
||||
bool fix_fields(THD *, Item **);
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_not>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_not>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_maxmin_subselect;
|
||||
|
|
@ -641,8 +641,8 @@ public:
|
|||
void add_key_fields(JOIN *join, KEY_FIELD **key_fields,
|
||||
uint *and_level, table_map usable_tables,
|
||||
SARGABLE_PARAM **sargables);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_trig_cond>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_trig_cond>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_not_all :public Item_func_not
|
||||
|
|
@ -679,8 +679,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "<nop>"; }
|
||||
Item *neg_transformer(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_nop_all>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_nop_all>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -720,8 +720,8 @@ public:
|
|||
uint in_equality_no;
|
||||
virtual uint exists2in_reserved_items() { return 1; };
|
||||
friend class Arg_comparator;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_eq>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_eq>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_equal :public Item_bool_rowready_func2
|
||||
|
|
@ -744,8 +744,8 @@ public:
|
|||
return add_key_fields_optimize_op(join, key_fields, and_level,
|
||||
usable_tables, sargables, true);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_equal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_equal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -760,8 +760,8 @@ public:
|
|||
cond_result eq_cmp_result() const { return COND_TRUE; }
|
||||
const char *func_name() const { return ">="; }
|
||||
Item *negated_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ge>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ge>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -776,8 +776,8 @@ public:
|
|||
cond_result eq_cmp_result() const { return COND_FALSE; }
|
||||
const char *func_name() const { return ">"; }
|
||||
Item *negated_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_gt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_gt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -792,8 +792,8 @@ public:
|
|||
cond_result eq_cmp_result() const { return COND_TRUE; }
|
||||
const char *func_name() const { return "<="; }
|
||||
Item *negated_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_le>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_le>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -808,8 +808,8 @@ public:
|
|||
cond_result eq_cmp_result() const { return COND_FALSE; }
|
||||
const char *func_name() const { return "<"; }
|
||||
Item *negated_item(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_lt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_lt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -833,8 +833,8 @@ public:
|
|||
Item *negated_item(THD *thd);
|
||||
void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
|
||||
table_map usable_tables, SARGABLE_PARAM **sargables);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ne>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ne>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -923,8 +923,8 @@ public:
|
|||
cond);
|
||||
return this;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_between>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_between>(thd, this); }
|
||||
|
||||
longlong val_int_cmp_string();
|
||||
longlong val_int_cmp_temporal();
|
||||
|
|
@ -951,8 +951,8 @@ public:
|
|||
agg_arg_charsets_for_comparison(cmp_collation, args, 2);
|
||||
fix_char_length(2); // returns "1" or "0" or "-1"
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_strcmp>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_strcmp>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -985,8 +985,8 @@ public:
|
|||
str->append(func_name());
|
||||
print_args(str, 0, query_type);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_interval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_interval>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1009,8 +1009,8 @@ public:
|
|||
}
|
||||
const char *func_name() const { return "coalesce"; }
|
||||
table_map not_null_tables() const { return 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_coalesce>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_coalesce>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1082,8 +1082,8 @@ public:
|
|||
const char *func_name() const { return "ifnull"; }
|
||||
|
||||
table_map not_null_tables() const { return 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ifnull>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ifnull>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1145,8 +1145,8 @@ public:
|
|||
const char *func_name() const { return "if"; }
|
||||
bool eval_not_null_tables(void *opt_arg);
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_if>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_if>(thd, this); }
|
||||
private:
|
||||
void cache_type_info(Item *source);
|
||||
};
|
||||
|
|
@ -1166,8 +1166,8 @@ public:
|
|||
{
|
||||
fix_length_and_dec2_eliminate_null(args + 1);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_nvl2>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_nvl2>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1253,8 +1253,8 @@ public:
|
|||
cond, &args[2]);
|
||||
return this;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_nullif>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_nullif>(thd, this); }
|
||||
Item *derived_field_transformer_for_having(THD *thd, uchar *arg)
|
||||
{ reset_first_arg_if_needed(); return this; }
|
||||
Item *derived_field_transformer_for_where(THD *thd, uchar *arg)
|
||||
|
|
@ -2114,9 +2114,9 @@ public:
|
|||
enum precedence precedence() const { return BETWEEN_PRECEDENCE; }
|
||||
CHARSET_INFO *compare_collation() const { return cmp_collation.collation; }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *build_clone(THD *thd)
|
||||
{
|
||||
Item_func_case *clone= (Item_func_case *) Item_func::build_clone(thd, mem_root);
|
||||
Item_func_case *clone= (Item_func_case *) Item_func::build_clone(thd);
|
||||
if (clone)
|
||||
clone->arg_buffer= 0;
|
||||
return clone;
|
||||
|
|
@ -2151,8 +2151,8 @@ public:
|
|||
return this;
|
||||
}
|
||||
Item *find_item();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_case_searched>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_case_searched>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2197,17 +2197,17 @@ public:
|
|||
void fix_length_and_dec();
|
||||
Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond);
|
||||
Item *find_item();
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *build_clone(THD *thd)
|
||||
{
|
||||
Item_func_case_simple *clone= (Item_func_case_simple *)
|
||||
Item_func_case::build_clone(thd, mem_root);
|
||||
Item_func_case::build_clone(thd);
|
||||
uint ncases= when_count();
|
||||
if (clone && clone->Predicant_to_list_comparator::init_clone(thd, ncases))
|
||||
return NULL;
|
||||
return clone;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_case_simple>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_case_simple>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2222,8 +2222,8 @@ public:
|
|||
{ Item_func::print(str, query_type); }
|
||||
void fix_length_and_dec();
|
||||
Item *find_item();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_decode_oracle>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_decode_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2384,11 +2384,11 @@ public:
|
|||
bool eval_not_null_tables(void *opt_arg);
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
|
||||
bool count_sargable_conds(void *arg);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_in>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_in>(thd, this); }
|
||||
Item *build_clone(THD *thd)
|
||||
{
|
||||
Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd, mem_root);
|
||||
Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd);
|
||||
if (clone)
|
||||
{
|
||||
clone->array= 0;
|
||||
|
|
@ -2516,8 +2516,8 @@ public:
|
|||
bool top_level);
|
||||
table_map not_null_tables() const { return 0; }
|
||||
Item *neg_transformer(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isnull>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isnull>(thd, this); }
|
||||
};
|
||||
|
||||
/* Functions used by HAVING for rewriting IN subquery */
|
||||
|
|
@ -2564,8 +2564,8 @@ public:
|
|||
Item *neg_transformer(THD *thd);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
void top_level_item() { abort_on_null=1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isnotnull>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isnotnull>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2706,8 +2706,8 @@ public:
|
|||
|
||||
bool find_selective_predicates_list_processor(void *arg);
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_like>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_like>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2818,11 +2818,11 @@ public:
|
|||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "regexp"; }
|
||||
enum precedence precedence() const { return CMP_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_regex>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_regex>(thd, this); }
|
||||
Item *build_clone(THD *thd)
|
||||
{
|
||||
Item_func_regex *clone= (Item_func_regex*) Item_bool_func::build_clone(thd, mem_root);
|
||||
Item_func_regex *clone= (Item_func_regex*) Item_bool_func::build_clone(thd);
|
||||
if (clone)
|
||||
clone->re.reset();
|
||||
return clone;
|
||||
|
|
@ -2867,8 +2867,8 @@ public:
|
|||
bool fix_fields(THD *thd, Item **ref);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "regexp_instr"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_regexp_instr>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_regexp_instr>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2945,7 +2945,7 @@ public:
|
|||
Item *compile(THD *thd, Item_analyzer analyzer, uchar **arg_p,
|
||||
Item_transformer transformer, uchar *arg_t);
|
||||
bool eval_not_null_tables(void *opt_arg);
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root);
|
||||
Item *build_clone(THD *thd);
|
||||
};
|
||||
|
||||
template <template<class> class LI, class T> class Item_equal_iterator;
|
||||
|
|
@ -3119,7 +3119,7 @@ public:
|
|||
|
||||
void set_context_field(Item_field *ctx_field) { context_field= ctx_field; }
|
||||
void set_link_equal_fields(bool flag) { link_equal_fields= flag; }
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
/*
|
||||
This does not comply with the specification of the virtual method,
|
||||
but Item_equal items are processed distinguishly anyway
|
||||
|
|
@ -3273,8 +3273,8 @@ public:
|
|||
void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
|
||||
table_map usable_tables, SARGABLE_PARAM **sargables);
|
||||
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cond_and>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cond_and>(thd, this); }
|
||||
};
|
||||
|
||||
inline bool is_cond_and(Item *item)
|
||||
|
|
@ -3300,8 +3300,8 @@ public:
|
|||
table_map not_null_tables() const { return and_tables_cache; }
|
||||
Item *copy_andor_structure(THD *thd);
|
||||
Item *neg_transformer(THD *thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_cond_or>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_cond_or>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dyncol_check :public Item_bool_func
|
||||
|
|
@ -3311,8 +3311,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "column_check"; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_check>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_check>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dyncol_exists :public Item_bool_func
|
||||
|
|
@ -3323,8 +3323,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "column_exists"; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_exists>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_exists>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3352,8 +3352,8 @@ public:
|
|||
:Item_func_cursor_bool_attr(thd, name, offset) { }
|
||||
const char *func_name() const { return "%ISOPEN"; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cursor_isopen>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cursor_isopen>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3364,8 +3364,8 @@ public:
|
|||
:Item_func_cursor_bool_attr(thd, name, offset) { maybe_null= true; }
|
||||
const char *func_name() const { return "%FOUND"; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cursor_found>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cursor_found>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3376,8 +3376,8 @@ public:
|
|||
:Item_func_cursor_bool_attr(thd, name, offset) { maybe_null= true; }
|
||||
const char *func_name() const { return "%NOTFOUND"; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cursor_notfound>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cursor_notfound>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3253,17 +3253,15 @@ udf_handler::fix_fields(THD *thd, Item_func_or_sum *func,
|
|||
func->used_tables_and_const_cache_join(item);
|
||||
f_args.arg_type[i]=item->result_type();
|
||||
}
|
||||
//TODO: why all following memory is not allocated with 1 thd->alloc() call?
|
||||
if (!(buffers=new String[arg_count]) ||
|
||||
!(f_args.args= (char**) thd->alloc(arg_count * sizeof(char *))) ||
|
||||
!(f_args.lengths= (ulong*) thd->alloc(arg_count * sizeof(long))) ||
|
||||
!(f_args.maybe_null= (char*) thd->alloc(arg_count * sizeof(char))) ||
|
||||
!(num_buffer= (char*) thd->alloc(arg_count *
|
||||
ALIGN_SIZE(sizeof(double)))) ||
|
||||
!(f_args.attributes= (const char**) thd->alloc(arg_count *
|
||||
sizeof(char *))) ||
|
||||
!(f_args.attribute_lengths= (ulong*) thd->alloc(arg_count *
|
||||
sizeof(long))))
|
||||
if (!(buffers=new (thd->mem_root) String[arg_count]) ||
|
||||
!multi_alloc_root(thd->mem_root,
|
||||
&f_args.args, arg_count * sizeof(char *),
|
||||
&f_args.lengths, arg_count * sizeof(long),
|
||||
&f_args.maybe_null, arg_count * sizeof(char),
|
||||
&num_buffer, arg_count * sizeof(double),
|
||||
&f_args.attributes, arg_count * sizeof(char *),
|
||||
&f_args.attribute_lengths, arg_count * sizeof(long),
|
||||
NullS))
|
||||
{
|
||||
free_udf(u_d);
|
||||
DBUG_RETURN(TRUE);
|
||||
|
|
@ -3275,6 +3273,8 @@ udf_handler::fix_fields(THD *thd, Item_func_or_sum *func,
|
|||
initid.const_item=func->const_item_cache;
|
||||
initid.decimals=func->decimals;
|
||||
initid.ptr=0;
|
||||
for (uint i1= 0 ; i1 < arg_count ; i1++)
|
||||
buffers[i1].set_thread_specific();
|
||||
|
||||
if (u_d->func_init)
|
||||
{
|
||||
|
|
@ -5299,8 +5299,8 @@ get_var_with_binlog(THD *thd, enum_sql_command sql_command,
|
|||
Item_func_set_user_var(thd, name,
|
||||
new (thd->mem_root) Item_null(thd))),
|
||||
thd->mem_root);
|
||||
/* Create the variable */
|
||||
if (sql_set_variables(thd, &tmp_var_list, false))
|
||||
/* Create the variable if the above allocations succeeded */
|
||||
if (thd->is_fatal_error || sql_set_variables(thd, &tmp_var_list, false))
|
||||
{
|
||||
thd->lex= sav_lex;
|
||||
goto err;
|
||||
|
|
@ -5837,20 +5837,25 @@ void Item_func_get_system_var::cleanup()
|
|||
cached_strval.free();
|
||||
}
|
||||
|
||||
/**
|
||||
@retval
|
||||
0 ok
|
||||
1 OOM error
|
||||
*/
|
||||
|
||||
void Item_func_match::init_search(THD *thd, bool no_order)
|
||||
bool Item_func_match::init_search(THD *thd, bool no_order)
|
||||
{
|
||||
DBUG_ENTER("Item_func_match::init_search");
|
||||
|
||||
if (!table->file->get_table()) // the handler isn't opened yet
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_RETURN(0);
|
||||
|
||||
/* Check if init_search() has been called before */
|
||||
if (ft_handler)
|
||||
{
|
||||
if (join_key)
|
||||
table->file->ft_handler= ft_handler;
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
if (key == NO_SUCH_KEY)
|
||||
|
|
@ -5862,6 +5867,8 @@ void Item_func_match::init_search(THD *thd, bool no_order)
|
|||
for (uint i= 1; i < arg_count; i++)
|
||||
fields.push_back(args[i]);
|
||||
concat_ws= new (thd->mem_root) Item_func_concat_ws(thd, fields);
|
||||
if (thd->is_fatal_error)
|
||||
DBUG_RETURN(1); // OOM
|
||||
/*
|
||||
Above function used only to get value and do not need fix_fields for it:
|
||||
Item_string - basic constant
|
||||
|
|
@ -5874,10 +5881,11 @@ void Item_func_match::init_search(THD *thd, bool no_order)
|
|||
if (master)
|
||||
{
|
||||
join_key= master->join_key= join_key | master->join_key;
|
||||
master->init_search(thd, no_order);
|
||||
if (master->init_search(thd, no_order))
|
||||
DBUG_RETURN(1);
|
||||
ft_handler= master->ft_handler;
|
||||
join_key= master->join_key;
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
String *ft_tmp= 0;
|
||||
|
|
@ -5892,8 +5900,9 @@ void Item_func_match::init_search(THD *thd, bool no_order)
|
|||
if (ft_tmp->charset() != cmp_collation.collation)
|
||||
{
|
||||
uint dummy_errors;
|
||||
search_value.copy(ft_tmp->ptr(), ft_tmp->length(), ft_tmp->charset(),
|
||||
cmp_collation.collation, &dummy_errors);
|
||||
if (search_value.copy(ft_tmp->ptr(), ft_tmp->length(), ft_tmp->charset(),
|
||||
cmp_collation.collation, &dummy_errors))
|
||||
DBUG_RETURN(1);
|
||||
ft_tmp= &search_value;
|
||||
}
|
||||
|
||||
|
|
@ -5908,7 +5917,7 @@ void Item_func_match::init_search(THD *thd, bool no_order)
|
|||
if (join_key)
|
||||
table->file->ft_handler=ft_handler;
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
332
sql/item_func.h
332
sql/item_func.h
|
|
@ -822,8 +822,8 @@ public:
|
|||
{
|
||||
return Cursor_ref::print_func(str, func_name());
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cursor_rowcount>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cursor_rowcount>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -842,8 +842,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_connection_id>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_connection_id>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -899,8 +899,8 @@ public:
|
|||
virtual void print(String *str, enum_query_type query_type);
|
||||
uint decimal_precision() const { return args[0]->decimal_precision(); }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_signed>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_signed>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -930,8 +930,8 @@ public:
|
|||
}
|
||||
uint decimal_precision() const { return max_length; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_unsigned>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_unsigned>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -960,8 +960,8 @@ public:
|
|||
const char *func_name() const { return "decimal_typecast"; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_decimal_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_decimal_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -983,8 +983,8 @@ public:
|
|||
const char *func_name() const { return "double_typecast"; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_double_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_double_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1010,8 +1010,8 @@ public:
|
|||
longlong int_op();
|
||||
double real_op();
|
||||
my_decimal *decimal_op(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_plus>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_plus>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_minus :public Item_func_additive_op
|
||||
|
|
@ -1041,8 +1041,8 @@ public:
|
|||
Item_func_additive_op::fix_length_and_dec_int();
|
||||
fix_unsigned_flag();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_minus>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_minus>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1060,8 +1060,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_mul>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_mul>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1079,8 +1079,8 @@ public:
|
|||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_int();
|
||||
void result_precision();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_div>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_div>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1103,8 +1103,8 @@ public:
|
|||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_int_div>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_int_div>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1138,8 +1138,8 @@ public:
|
|||
}
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_mod>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_mod>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1164,8 +1164,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
uint decimal_precision() const { return args[0]->decimal_precision(); }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_neg>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_neg>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1181,8 +1181,8 @@ public:
|
|||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_decimal();
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_abs>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_abs>(thd, this); }
|
||||
};
|
||||
|
||||
// A class to handle logarithmic and trigonometric functions
|
||||
|
|
@ -1207,8 +1207,8 @@ public:
|
|||
Item_func_exp(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "exp"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_exp>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_exp>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1218,8 +1218,8 @@ public:
|
|||
Item_func_ln(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "ln"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ln>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ln>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1230,8 +1230,8 @@ public:
|
|||
Item_func_log(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "log"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_log>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_log>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1241,8 +1241,8 @@ public:
|
|||
Item_func_log2(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "log2"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_log2>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_log2>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1252,8 +1252,8 @@ public:
|
|||
Item_func_log10(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "log10"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_log10>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_log10>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1263,8 +1263,8 @@ public:
|
|||
Item_func_sqrt(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "sqrt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sqrt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sqrt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1274,8 +1274,8 @@ public:
|
|||
Item_func_pow(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "pow"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_pow>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_pow>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1285,8 +1285,8 @@ public:
|
|||
Item_func_acos(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "acos"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_acos>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_acos>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_asin :public Item_dec_func
|
||||
|
|
@ -1295,8 +1295,8 @@ public:
|
|||
Item_func_asin(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "asin"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_asin>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_asin>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_atan :public Item_dec_func
|
||||
|
|
@ -1306,8 +1306,8 @@ public:
|
|||
Item_func_atan(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "atan"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_atan>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_atan>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_cos :public Item_dec_func
|
||||
|
|
@ -1316,8 +1316,8 @@ public:
|
|||
Item_func_cos(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "cos"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cos>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cos>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_sin :public Item_dec_func
|
||||
|
|
@ -1326,8 +1326,8 @@ public:
|
|||
Item_func_sin(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "sin"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sin>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sin>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_tan :public Item_dec_func
|
||||
|
|
@ -1336,8 +1336,8 @@ public:
|
|||
Item_func_tan(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "tan"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_tan>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_tan>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_cot :public Item_dec_func
|
||||
|
|
@ -1346,8 +1346,8 @@ public:
|
|||
Item_func_cot(THD *thd, Item *a): Item_dec_func(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "cot"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_cot>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_cot>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1369,8 +1369,8 @@ public:
|
|||
longlong int_op();
|
||||
double real_op();
|
||||
my_decimal *decimal_op(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ceiling>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ceiling>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1382,8 +1382,8 @@ public:
|
|||
longlong int_op();
|
||||
double real_op();
|
||||
my_decimal *decimal_op(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_floor>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_floor>(thd, this); }
|
||||
};
|
||||
|
||||
/* This handles round and truncate */
|
||||
|
|
@ -1407,8 +1407,8 @@ public:
|
|||
{
|
||||
args[0]->type_handler()->Item_func_round_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_round>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_round>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1432,8 +1432,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rand>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rand>(thd, this); }
|
||||
private:
|
||||
void seed_random (Item * val);
|
||||
};
|
||||
|
|
@ -1449,8 +1449,8 @@ public:
|
|||
uint decimal_precision() const { return 1; }
|
||||
void fix_length_and_dec() { fix_char_length(2); }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sign>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sign>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1468,8 +1468,8 @@ public:
|
|||
const char *func_name() const { return name; }
|
||||
void fix_length_and_dec()
|
||||
{ decimals= NOT_FIXED_DEC; max_length= float_length(decimals); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_units>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_units>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1563,8 +1563,8 @@ class Item_func_min :public Item_func_min_max
|
|||
public:
|
||||
Item_func_min(THD *thd, List<Item> &list): Item_func_min_max(thd, list, 1) {}
|
||||
const char *func_name() const { return "least"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_min>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_min>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_max :public Item_func_min_max
|
||||
|
|
@ -1572,8 +1572,8 @@ class Item_func_max :public Item_func_min_max
|
|||
public:
|
||||
Item_func_max(THD *thd, List<Item> &list): Item_func_min_max(thd, list, -1) {}
|
||||
const char *func_name() const { return "greatest"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_max>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_max>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1604,8 +1604,8 @@ public:
|
|||
/* The item could be a NULL constant. */
|
||||
null_value= args[0]->is_null();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rollup_const>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rollup_const>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1626,8 +1626,8 @@ public:
|
|||
Item_func_octet_length(THD *thd, Item *a): Item_long_func_length(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "octet_length"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_octet_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_octet_length>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_length :public Item_longlong_func
|
||||
|
|
@ -1641,8 +1641,8 @@ public:
|
|||
}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "bit_length"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_length>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_char_length :public Item_long_func_length
|
||||
|
|
@ -1652,8 +1652,8 @@ public:
|
|||
Item_func_char_length(THD *thd, Item *a): Item_long_func_length(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "char_length"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_char_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_char_length>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_coercibility :public Item_long_func
|
||||
|
|
@ -1673,8 +1673,8 @@ public:
|
|||
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
{ return this; }
|
||||
bool const_item() const { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_coercibility>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_coercibility>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1706,8 +1706,8 @@ public:
|
|||
agg_arg_charsets_for_comparison(cmp_collation, args, 2);
|
||||
}
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_locate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_locate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1721,8 +1721,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "field"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_field>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1736,8 +1736,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "ascii"; }
|
||||
void fix_length_and_dec() { max_length=3; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ascii>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ascii>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_ord :public Item_long_func
|
||||
|
|
@ -1750,8 +1750,8 @@ public:
|
|||
void fix_length_and_dec() { fix_char_length(7); }
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "ord"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ord>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ord>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_find_in_set :public Item_long_func
|
||||
|
|
@ -1768,8 +1768,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "find_in_set"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_find_in_set>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_find_in_set>(thd, this); }
|
||||
};
|
||||
|
||||
/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */
|
||||
|
|
@ -1797,8 +1797,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "|"; }
|
||||
enum precedence precedence() const { return BITOR_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_or>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_or>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_and :public Item_func_bit
|
||||
|
|
@ -1808,8 +1808,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "&"; }
|
||||
enum precedence precedence() const { return BITAND_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_and>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_and>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_count :public Item_long_func
|
||||
|
|
@ -1821,8 +1821,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "bit_count"; }
|
||||
void fix_length_and_dec() { max_length=2; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_count>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_shift_left :public Item_func_bit
|
||||
|
|
@ -1832,8 +1832,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "<<"; }
|
||||
enum precedence precedence() const { return SHIFT_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_shift_left>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_shift_left>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_shift_right :public Item_func_bit
|
||||
|
|
@ -1843,8 +1843,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return ">>"; }
|
||||
enum precedence precedence() const { return SHIFT_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_shift_right>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_shift_right>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_bit_neg :public Item_func_bit
|
||||
|
|
@ -1859,8 +1859,8 @@ public:
|
|||
str->append(func_name());
|
||||
args[0]->print_parenthesised(str, query_type, precedence());
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_neg>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_neg>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1884,8 +1884,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_last_insert_id>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_last_insert_id>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1908,8 +1908,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_benchmark>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_benchmark>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1935,8 +1935,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sleep>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sleep>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2063,8 +2063,8 @@ class Item_func_udf_float :public Item_udf_func
|
|||
String *val_str(String *str);
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2081,8 +2081,8 @@ public:
|
|||
String *val_str(String *str);
|
||||
const Type_handler *type_handler() const { return &type_handler_longlong; }
|
||||
void fix_length_and_dec() { decimals= 0; max_length= 21; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2099,8 +2099,8 @@ public:
|
|||
String *val_str(String *str);
|
||||
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2138,8 +2138,8 @@ public:
|
|||
}
|
||||
const Type_handler *type_handler() const { return string_type_handler(); }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_udf_str>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_udf_str>(thd, this); }
|
||||
};
|
||||
|
||||
#else /* Dummy functions to get sql_yacc.cc compiled */
|
||||
|
|
@ -2221,8 +2221,8 @@ class Item_func_get_lock :public Item_long_func
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_get_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_lock>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_release_lock :public Item_long_func
|
||||
|
|
@ -2245,8 +2245,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_release_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_release_lock>(thd, this); }
|
||||
};
|
||||
|
||||
/* replication functions */
|
||||
|
|
@ -2276,8 +2276,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_master_pos_wait>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_master_pos_wait>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2301,8 +2301,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_master_gtid_wait>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_master_gtid_wait>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2409,8 +2409,8 @@ public:
|
|||
bool register_field_in_bitmap(void *arg);
|
||||
bool set_entry(THD *thd, bool create_if_not_exists);
|
||||
void cleanup();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_set_user_var>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_set_user_var>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2437,8 +2437,8 @@ public:
|
|||
table_map used_tables() const
|
||||
{ return const_item() ? 0 : RAND_TABLE_BIT; }
|
||||
bool eq(const Item *item, bool binary_cmp) const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_get_user_var>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_user_var>(thd, this); }
|
||||
private:
|
||||
bool set_value(THD *thd, sp_rcontext *ctx, Item **it);
|
||||
|
||||
|
|
@ -2482,8 +2482,8 @@ public:
|
|||
void set_null_value(CHARSET_INFO* cs);
|
||||
void set_value(const char *str, uint length, CHARSET_INFO* cs);
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_user_var_as_out_param>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_user_var_as_out_param>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2537,8 +2537,8 @@ public:
|
|||
|
||||
void cleanup();
|
||||
bool check_vcol_func_processor(void *arg);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_get_system_var>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_system_var>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2587,14 +2587,14 @@ public:
|
|||
virtual void print(String *str, enum_query_type query_type);
|
||||
|
||||
bool fix_index();
|
||||
void init_search(THD *thd, bool no_order);
|
||||
bool init_search(THD *thd, bool no_order);
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
{
|
||||
return mark_unsupported_function("match ... against()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_match>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_match>(thd, this); }
|
||||
Item *build_clone(THD *thd) { return 0; }
|
||||
private:
|
||||
/**
|
||||
Check whether storage engine for given table,
|
||||
|
|
@ -2639,8 +2639,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "^"; }
|
||||
enum precedence precedence() const { return BITXOR_PRECEDENCE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_bit_xor>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_bit_xor>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_is_free_lock :public Item_long_func
|
||||
|
|
@ -2657,8 +2657,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_free_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_free_lock>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_is_used_lock :public Item_long_func
|
||||
|
|
@ -2675,8 +2675,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_used_lock>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_used_lock>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2724,8 +2724,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_row_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_row_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2867,11 +2867,11 @@ public:
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sp>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sp>(thd, this); }
|
||||
Item *build_clone(THD *thd)
|
||||
{
|
||||
Item_func_sp *clone= (Item_func_sp *) Item_func::build_clone(thd, mem_root);
|
||||
Item_func_sp *clone= (Item_func_sp *) Item_func::build_clone(thd);
|
||||
if (clone)
|
||||
clone->sp_result_field= NULL;
|
||||
return clone;
|
||||
|
|
@ -2895,8 +2895,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_found_rows>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_found_rows>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2914,8 +2914,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_oracle_sql_rowcount>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_oracle_sql_rowcount>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2938,8 +2938,8 @@ public:
|
|||
maybe_null= null_value= false;
|
||||
max_length= 11;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sqlcode>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sqlcode>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2958,8 +2958,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uuid_short>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uuid_short>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2988,8 +2988,8 @@ public:
|
|||
Item_func::update_used_tables();
|
||||
maybe_null= last_value->maybe_null;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_last_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_last_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3011,8 +3011,8 @@ public:
|
|||
maybe_null= 1; /* In case of errors */
|
||||
}
|
||||
bool const_item() const { return 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_nextval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_nextval>(thd, this); }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
{
|
||||
|
|
@ -3031,8 +3031,8 @@ public:
|
|||
Item_func_nextval(thd, table) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "lastval"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_lastval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_lastval>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3052,8 +3052,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "setval"; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_setval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_setval>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -202,8 +202,8 @@ public:
|
|||
Item_geometry_func(thd, a, srid) {}
|
||||
const char *func_name() const { return "st_geometryfromtext"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_from_text>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_from_text>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_geometry_from_wkb: public Item_geometry_func
|
||||
|
|
@ -219,8 +219,8 @@ public:
|
|||
Item_geometry_func(thd, a, srid) {}
|
||||
const char *func_name() const { return "st_geometryfromwkb"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_from_wkb>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_from_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -241,8 +241,8 @@ public:
|
|||
Item_geometry_func(thd, js, opt, srid) {}
|
||||
const char *func_name() const { return "st_geomfromgeojson"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_from_json>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_from_json>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -254,8 +254,8 @@ public:
|
|||
const char *func_name() const { return "st_astext"; }
|
||||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_as_wkt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_as_wkt>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_as_wkb: public Item_binary_func_args_geometry
|
||||
|
|
@ -273,8 +273,8 @@ public:
|
|||
max_length= (uint32) UINT_MAX32;
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_as_wkb>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_as_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -296,8 +296,8 @@ public:
|
|||
const char *func_name() const { return "st_asgeojson"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str_ascii(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_as_geojson>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_as_geojson>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -314,8 +314,8 @@ public:
|
|||
fix_length_and_charset(20, default_charset());
|
||||
maybe_null= 1;
|
||||
};
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_geometry_type>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_geometry_type>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -349,8 +349,8 @@ public:
|
|||
{}
|
||||
const char *func_name() const { return "st_convexhull"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_convexhull>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_convexhull>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -362,8 +362,8 @@ public:
|
|||
const char *func_name() const { return "st_centroid"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_centroid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_centroid>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_envelope: public Item_geometry_func_args_geometry
|
||||
|
|
@ -374,8 +374,8 @@ public:
|
|||
const char *func_name() const { return "st_envelope"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_envelope>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_envelope>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -408,8 +408,8 @@ public:
|
|||
:Item_geometry_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_boundary"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_boundary>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_boundary>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -424,8 +424,8 @@ public:
|
|||
const char *func_name() const { return "point"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_point>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_point>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_decomp: public Item_geometry_func_args_geometry
|
||||
|
|
@ -450,8 +450,8 @@ public:
|
|||
}
|
||||
}
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_decomp>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_decomp>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_decomp_n: public Item_geometry_func_args_geometry
|
||||
|
|
@ -483,8 +483,8 @@ public:
|
|||
}
|
||||
}
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_decomp_n>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_decomp_n>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_collection: public Item_geometry_func
|
||||
|
|
@ -521,8 +521,8 @@ public:
|
|||
}
|
||||
|
||||
const char *func_name() const { return "geometrycollection"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_collection>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_collection>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -571,7 +571,7 @@ public:
|
|||
usable_tables, sargables, false);
|
||||
}
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *build_clone(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -583,8 +583,8 @@ public:
|
|||
{ }
|
||||
longlong val_int();
|
||||
const char *func_name() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_mbr_rel>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_mbr_rel>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -599,8 +599,8 @@ public:
|
|||
{ }
|
||||
longlong val_int();
|
||||
const char *func_name() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_precise_rel>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_precise_rel>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -622,8 +622,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "st_relate"; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_relate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_relate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -658,8 +658,8 @@ public:
|
|||
{
|
||||
Item_func::print(str, query_type);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_spatial_operation>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_spatial_operation>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -715,8 +715,8 @@ public:
|
|||
:Item_geometry_func_args_geometry(thd, obj, distance) {}
|
||||
const char *func_name() const { return "st_buffer"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_buffer>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_buffer>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -729,8 +729,8 @@ public:
|
|||
const char *func_name() const { return "st_isempty"; }
|
||||
void fix_length_and_dec() { maybe_null= 1; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isempty>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isempty>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_issimple: public Item_long_func_args_geometry
|
||||
|
|
@ -746,8 +746,8 @@ public:
|
|||
const char *func_name() const { return "st_issimple"; }
|
||||
void fix_length_and_dec() { decimals=0; max_length=2; }
|
||||
uint decimal_precision() const { return 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_issimple>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_issimple>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_isclosed: public Item_long_func_args_geometry
|
||||
|
|
@ -759,8 +759,8 @@ public:
|
|||
const char *func_name() const { return "st_isclosed"; }
|
||||
void fix_length_and_dec() { decimals=0; max_length=2; }
|
||||
uint decimal_precision() const { return 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isclosed>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isclosed>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_isring: public Item_func_issimple
|
||||
|
|
@ -769,8 +769,8 @@ public:
|
|||
Item_func_isring(THD *thd, Item *a): Item_func_issimple(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_isring"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_isring>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_isring>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dimension: public Item_long_func_args_geometry
|
||||
|
|
@ -781,8 +781,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "st_dimension"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dimension>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dimension>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -797,8 +797,8 @@ public:
|
|||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_x>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_x>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -813,8 +813,8 @@ public:
|
|||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_y>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_y>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -826,8 +826,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "st_numgeometries"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_numgeometries>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_numgeometries>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -839,8 +839,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "st_numinteriorrings"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_numinteriorring>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_numinteriorring>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -852,8 +852,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "st_numpoints"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_numpoints>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_numpoints>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -868,8 +868,8 @@ public:
|
|||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_area>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_area>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -886,8 +886,8 @@ public:
|
|||
Item_real_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_glength>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_glength>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -899,8 +899,8 @@ public:
|
|||
longlong val_int();
|
||||
const char *func_name() const { return "srid"; }
|
||||
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_srid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_srid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -916,8 +916,8 @@ public:
|
|||
:Item_real_func_args_geometry_geometry(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_distance"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_distance>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_distance>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -933,8 +933,8 @@ public:
|
|||
const char *func_name() const { return "st_pointonsurface"; }
|
||||
String *val_str(String *);
|
||||
Field::geometry_type get_geometry_type() const;
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_pointonsurface>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_pointonsurface>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -951,8 +951,8 @@ class Item_func_gis_debug: public Item_long_func
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_gis_debug>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_gis_debug>(thd, this); }
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ public:
|
|||
maybe_null= 1;
|
||||
unsigned_flag= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet_aton>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet_aton>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -61,8 +61,8 @@ public:
|
|||
fix_length_and_charset(3 * 8 + 7, default_charset());
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet_ntoa>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet_ntoa>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -130,8 +130,8 @@ public:
|
|||
fix_length_and_charset(16, &my_charset_bin);
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet6_aton>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet6_aton>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg, String *buffer);
|
||||
|
|
@ -164,8 +164,8 @@ public:
|
|||
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_inet6_ntoa>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_inet6_ntoa>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg, String *buffer);
|
||||
|
|
@ -186,8 +186,8 @@ public:
|
|||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv4"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv4>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv4>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
|
|
@ -208,8 +208,8 @@ public:
|
|||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv6"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv6>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv6>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
|
|
@ -230,8 +230,8 @@ public:
|
|||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv4_compat"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
|
|
@ -252,8 +252,8 @@ public:
|
|||
public:
|
||||
virtual const char *func_name() const
|
||||
{ return "is_ipv4_mapped"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, this); }
|
||||
|
||||
protected:
|
||||
virtual bool calc_value(const String *arg);
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public:
|
|||
Item_bool_func::fix_length_and_dec();
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_valid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_valid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -70,8 +70,8 @@ public:
|
|||
Item_bool_func(thd, js, i_path) {}
|
||||
const char *func_name() const { return "json_exists"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_exists>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_exists>(thd, this); }
|
||||
longlong val_int();
|
||||
};
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
virtual bool check_and_get_value(json_engine_t *je, String *res, int *error);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_value>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -102,8 +102,8 @@ public:
|
|||
bool is_json_type() { return true; }
|
||||
const char *func_name() const { return "json_query"; }
|
||||
bool check_and_get_value(json_engine_t *je, String *res, int *error);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_query>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_query>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -117,8 +117,8 @@ public:
|
|||
const char *func_name() const { return "json_quote"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_quote>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_quote>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -132,8 +132,8 @@ public:
|
|||
const char *func_name() const { return "json_unquote"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_unquote>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_unquote>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -168,8 +168,8 @@ public:
|
|||
longlong val_int();
|
||||
double val_real();
|
||||
uint get_n_paths() const { return arg_count - 1; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_extract>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_extract>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -187,8 +187,8 @@ public:
|
|||
const char *func_name() const { return "json_contains"; }
|
||||
void fix_length_and_dec();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_contains>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_contains>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -210,8 +210,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
void cleanup();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_contains_path>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_contains_path>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -229,8 +229,8 @@ public:
|
|||
bool is_json_type() { return true; }
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "json_array"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_array>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_array>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -246,8 +246,8 @@ public:
|
|||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count/2; }
|
||||
const char *func_name() const { return "json_array_append"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_array_append>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_array_append>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -258,8 +258,8 @@ public:
|
|||
Item_func_json_array_append(thd, list) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "json_array_insert"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_array_insert>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_array_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -273,8 +273,8 @@ public:
|
|||
String *val_str(String *);
|
||||
bool is_json_type() { return true; }
|
||||
const char *func_name() const { return "json_object"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_object>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_object>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -288,8 +288,8 @@ public:
|
|||
String *val_str(String *);
|
||||
bool is_json_type() { return true; }
|
||||
const char *func_name() const { return "json_merge"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_merge>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_merge>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -311,8 +311,8 @@ public:
|
|||
const char *func_name() const { return "json_length"; }
|
||||
void fix_length_and_dec();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -327,8 +327,8 @@ public:
|
|||
const char *func_name() const { return "json_depth"; }
|
||||
void fix_length_and_dec() { max_length= 10; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_depth>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_depth>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -341,8 +341,8 @@ public:
|
|||
const char *func_name() const { return "json_type"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_type>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_type>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -364,8 +364,8 @@ public:
|
|||
return mode_insert ?
|
||||
(mode_replace ? "json_set" : "json_insert") : "json_update";
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_insert>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -380,8 +380,8 @@ public:
|
|||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count - 1; }
|
||||
const char *func_name() const { return "json_remove"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_remove>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_remove>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -397,8 +397,8 @@ public:
|
|||
const char *func_name() const { return "json_keys"; }
|
||||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_keys>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_keys>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -422,8 +422,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count > 4 ? arg_count - 4 : 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_search>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_search>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -451,8 +451,8 @@ public:
|
|||
String *val_str(String *str);
|
||||
String *val_json(String *str);
|
||||
bool is_json_type() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_json_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_json_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -163,15 +163,15 @@ void Item_row::bring_value()
|
|||
}
|
||||
|
||||
|
||||
Item* Item_row::build_clone(THD *thd, MEM_ROOT *mem_root)
|
||||
Item* Item_row::build_clone(THD *thd)
|
||||
{
|
||||
Item_row *copy= (Item_row *) get_copy(thd, mem_root);
|
||||
Item_row *copy= (Item_row *) get_copy(thd);
|
||||
if (!copy)
|
||||
return 0;
|
||||
copy->args= (Item**) alloc_root(mem_root, sizeof(Item*) * arg_count);
|
||||
copy->args= (Item**) alloc_root(thd->mem_root, sizeof(Item*) * arg_count);
|
||||
for (uint i= 0; i < arg_count; i++)
|
||||
{
|
||||
Item *arg_clone= args[i]->build_clone(thd, mem_root);
|
||||
Item *arg_clone= args[i]->build_clone(thd);
|
||||
if (!arg_clone)
|
||||
return 0;
|
||||
copy->args[i]= arg_clone;
|
||||
|
|
|
|||
|
|
@ -128,9 +128,9 @@ public:
|
|||
}
|
||||
|
||||
bool check_vcol_func_processor(void *arg) {return FALSE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_row>(thd, mem_root, this); }
|
||||
Item *build_clone(THD *thd, MEM_ROOT *mem_root);
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_row>(thd, this); }
|
||||
Item *build_clone(THD *thd);
|
||||
};
|
||||
|
||||
#endif /* ITEM_ROW_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -147,8 +147,8 @@ public:
|
|||
fix_length_and_charset(32, default_charset());
|
||||
}
|
||||
const char *func_name() const { return "md5"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_md5>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_md5>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -159,8 +159,8 @@ public:
|
|||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "sha"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sha>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sha>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_sha2 :public Item_str_ascii_checksum_func
|
||||
|
|
@ -171,8 +171,8 @@ public:
|
|||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "sha2"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sha2>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sha2>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_to_base64 :public Item_str_ascii_checksum_func
|
||||
|
|
@ -184,8 +184,8 @@ public:
|
|||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "to_base64"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_to_base64>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_to_base64>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_from_base64 :public Item_str_binary_checksum_func
|
||||
|
|
@ -197,8 +197,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "from_base64"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_from_base64>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_from_base64>(thd, this); }
|
||||
};
|
||||
|
||||
#include <my_crypt.h>
|
||||
|
|
@ -223,8 +223,8 @@ public:
|
|||
Item_aes_crypt(thd, a, b) {}
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "aes_encrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_aes_encrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_aes_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_aes_decrypt :public Item_aes_crypt
|
||||
|
|
@ -234,8 +234,8 @@ public:
|
|||
Item_aes_crypt(thd, a, b) {}
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "aes_decrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_aes_decrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_aes_decrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -281,8 +281,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "concat"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_concat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_concat>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -301,9 +301,9 @@ public:
|
|||
{ }
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "concat_operator_oracle"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
Item *get_copy(THD *thd)
|
||||
{
|
||||
return get_item_copy<Item_func_concat_operator_oracle>(thd, mem_root, this);
|
||||
return get_item_copy<Item_func_concat_operator_oracle>(thd, this);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -321,8 +321,8 @@ public:
|
|||
maybe_null= 1;
|
||||
}
|
||||
const char *func_name() const { return "decode_histogram"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_decode_histogram>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_decode_histogram>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_concat_ws :public Item_str_func
|
||||
|
|
@ -334,8 +334,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "concat_ws"; }
|
||||
table_map not_null_tables() const { return 0; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_concat_ws>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_concat_ws>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_reverse :public Item_str_func
|
||||
|
|
@ -346,8 +346,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "reverse"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_reverse>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_reverse>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -361,8 +361,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
String *val_str_internal(String *str, String *empty_string_for_null);
|
||||
const char *func_name() const { return "replace"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_replace>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_replace>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -374,8 +374,8 @@ public:
|
|||
Item_func_replace(thd, org, find, replace) {}
|
||||
String *val_str(String *to) { return val_str_internal(to, &tmp_emtpystr); };
|
||||
const char *func_name() const { return "replace_oracle"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_replace_oracle>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_replace_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ public:
|
|||
bool fix_fields(THD *thd, Item **ref);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "regexp_replace"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0;}
|
||||
Item *get_copy(THD *thd) { return 0;}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ public:
|
|||
bool fix_fields(THD *thd, Item **ref);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "regexp_substr"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -436,8 +436,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "insert"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_insert>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_insert>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -459,8 +459,8 @@ public:
|
|||
Item_func_lcase(THD *thd, Item *item): Item_str_conv(thd, item) {}
|
||||
const char *func_name() const { return "lcase"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_lcase>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_lcase>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_ucase :public Item_str_conv
|
||||
|
|
@ -469,8 +469,8 @@ public:
|
|||
Item_func_ucase(THD *thd, Item *item): Item_str_conv(thd, item) {}
|
||||
const char *func_name() const { return "ucase"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ucase>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ucase>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -482,8 +482,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "left"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_left>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_left>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -495,8 +495,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "right"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_right>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_right>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -512,8 +512,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "substr"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_substr>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_substr>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_substr_oracle :public Item_func_substr
|
||||
|
|
@ -527,8 +527,8 @@ public:
|
|||
Item_func_substr_oracle(THD *thd, Item *a, Item *b, Item *c):
|
||||
Item_func_substr(thd, a, b, c) {}
|
||||
const char *func_name() const { return "substr_oracle"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_substr_oracle>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_substr_oracle>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_substr_index :public Item_str_func
|
||||
|
|
@ -540,8 +540,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "substring_index"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_substr_index>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_substr_index>(thd, this); }
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -574,8 +574,8 @@ public:
|
|||
const char *func_name() const { return "trim"; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
virtual const char *mode_name() const { return "both"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_trim>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_trim>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -587,8 +587,8 @@ public:
|
|||
String *val_str(String *);
|
||||
const char *func_name() const { return "ltrim"; }
|
||||
const char *mode_name() const { return "leading"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_ltrim>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_ltrim>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -600,8 +600,8 @@ public:
|
|||
String *val_str(String *);
|
||||
const char *func_name() const { return "rtrim"; }
|
||||
const char *mode_name() const { return "trailing"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rtrim>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rtrim>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -639,8 +639,8 @@ public:
|
|||
"password" : "old_password"); }
|
||||
static char *alloc(THD *thd, const char *password, size_t pass_len,
|
||||
enum PW_Alg al);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_password>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_password>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -661,8 +661,8 @@ public:
|
|||
max_length = args[0]->max_length + 9;
|
||||
}
|
||||
const char *func_name() const { return "des_encrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_des_encrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_des_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_des_decrypt :public Item_str_binary_checksum_func
|
||||
|
|
@ -683,8 +683,8 @@ public:
|
|||
max_length-= 9U;
|
||||
}
|
||||
const char *func_name() const { return "des_decrypt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_des_decrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_des_decrypt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -719,8 +719,8 @@ public:
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_encrypt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_encrypt>(thd, this); }
|
||||
};
|
||||
|
||||
#include "sql_crypt.h"
|
||||
|
|
@ -739,8 +739,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "encode"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_encode>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_encode>(thd, this); }
|
||||
protected:
|
||||
virtual void crypto_transform(String *);
|
||||
private:
|
||||
|
|
@ -754,8 +754,8 @@ class Item_func_decode :public Item_func_encode
|
|||
public:
|
||||
Item_func_decode(THD *thd, Item *a, Item *seed_arg): Item_func_encode(thd, a, seed_arg) {}
|
||||
const char *func_name() const { return "decode"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_decode>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_decode>(thd, this); }
|
||||
protected:
|
||||
void crypto_transform(String *);
|
||||
};
|
||||
|
|
@ -794,8 +794,8 @@ public:
|
|||
}
|
||||
const char *func_name() const { return "database"; }
|
||||
const char *fully_qualified_func_name() const { return "database()"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_database>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_database>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -815,8 +815,8 @@ public:
|
|||
max_length= 512 * system_charset_info->mbmaxlen;
|
||||
null_value= maybe_null= false;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sqlerrm>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sqlerrm>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -847,8 +847,8 @@ public:
|
|||
{
|
||||
return save_str_value_in_field(field, &str_value);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_user>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_user>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -897,8 +897,8 @@ public:
|
|||
return mark_unsupported_function(fully_qualified_func_name(), arg,
|
||||
VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_current_role>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_current_role>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -910,8 +910,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "soundex"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_soundex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_soundex>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -924,8 +924,8 @@ public:
|
|||
String *val_str(String *str);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "elt"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_elt>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_elt>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -938,8 +938,8 @@ public:
|
|||
String *val_str(String *str);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "make_set"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_make_set>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_make_set>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -955,8 +955,8 @@ public:
|
|||
String *val_str_ascii(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "format"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -978,8 +978,8 @@ public:
|
|||
max_length= arg_count * 4;
|
||||
}
|
||||
const char *func_name() const { return "char"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_char>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_char>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_chr :public Item_func_char
|
||||
|
|
@ -993,8 +993,8 @@ public:
|
|||
max_length= 4;
|
||||
}
|
||||
const char *func_name() const { return "chr"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_chr>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_chr>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_repeat :public Item_str_func
|
||||
|
|
@ -1006,8 +1006,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "repeat"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_repeat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_repeat>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1018,8 +1018,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "space"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_space>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_space>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1035,8 +1035,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_binlog_gtid_pos>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_binlog_gtid_pos>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1062,8 +1062,8 @@ public:
|
|||
Item_func_pad(thd, arg1, arg2) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "rpad"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_rpad>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_rpad>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1076,8 +1076,8 @@ public:
|
|||
Item_func_pad(thd, arg1, arg2) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "lpad"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_lpad>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_lpad>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1094,8 +1094,8 @@ public:
|
|||
max_length=64;
|
||||
maybe_null= 1;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_conv>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_conv>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1129,8 +1129,8 @@ public:
|
|||
fix_char_length(args[0]->max_length * 2);
|
||||
m_arg0_type_handler= args[0]->type_handler();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_hex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_hex>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_unhex :public Item_str_func
|
||||
|
|
@ -1150,8 +1150,8 @@ public:
|
|||
decimals=0;
|
||||
max_length=(1+args[0]->max_length)/2;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_unhex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_unhex>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1182,8 +1182,8 @@ public:
|
|||
Item_func_like_range_min(THD *thd, Item *a, Item *b):
|
||||
Item_func_like_range(thd, a, b, true) { }
|
||||
const char *func_name() const { return "like_range_min"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_like_range_min>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_like_range_min>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1193,8 +1193,8 @@ public:
|
|||
Item_func_like_range_max(THD *thd, Item *a, Item *b):
|
||||
Item_func_like_range(thd, a, b, false) { }
|
||||
const char *func_name() const { return "like_range_max"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_like_range_max>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_like_range_max>(thd, this); }
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -1220,8 +1220,8 @@ public:
|
|||
void print(String *str, enum_query_type query_type);
|
||||
const char *func_name() const { return "cast_as_binary"; }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_binary>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_binary>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1242,8 +1242,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_load_file>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_load_file>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1259,8 +1259,8 @@ class Item_func_export_set: public Item_str_func
|
|||
String *val_str(String *str);
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "export_set"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_export_set>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_export_set>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1278,8 +1278,8 @@ public:
|
|||
2 * collation.collation->mbmaxlen;
|
||||
max_length= (uint32) MY_MIN(max_result_length, MAX_BLOB_WIDTH);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_quote>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_quote>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_conv_charset :public Item_str_func
|
||||
|
|
@ -1362,8 +1362,8 @@ public:
|
|||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "convert"; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_conv_charset>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_conv_charset>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_set_collation :public Item_str_func
|
||||
|
|
@ -1384,8 +1384,8 @@ public:
|
|||
return args[0]->field_for_view_update();
|
||||
}
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_set_collation>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_set_collation>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1413,8 +1413,8 @@ public:
|
|||
:Item_func_expr_str_metadata(thd, a) { }
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "charset"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_charset>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_charset>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1425,8 +1425,8 @@ public:
|
|||
:Item_func_expr_str_metadata(thd, a) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "collation"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_collation>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_collation>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1460,8 +1460,8 @@ public:
|
|||
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
{ return this; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_weight_string>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_weight_string>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_crc32 :public Item_long_func
|
||||
|
|
@ -1475,8 +1475,8 @@ public:
|
|||
const char *func_name() const { return "crc32"; }
|
||||
void fix_length_and_dec() { max_length=10; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_crc32>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_crc32>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_uncompressed_length : public Item_long_func_length
|
||||
|
|
@ -1488,8 +1488,8 @@ public:
|
|||
const char *func_name() const{return "uncompressed_length";}
|
||||
void fix_length_and_dec() { max_length=10; maybe_null= true; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uncompressed_length>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uncompressed_length>(thd, this); }
|
||||
};
|
||||
|
||||
#ifdef HAVE_COMPRESS
|
||||
|
|
@ -1507,8 +1507,8 @@ public:
|
|||
void fix_length_and_dec(){max_length= (args[0]->max_length*120)/100+12;}
|
||||
const char *func_name() const{return "compress";}
|
||||
String *val_str(String *) ZLIB_DEPENDED_FUNCTION
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_compress>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_compress>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_uncompress: public Item_str_binary_checksum_func
|
||||
|
|
@ -1520,8 +1520,8 @@ public:
|
|||
void fix_length_and_dec(){ maybe_null= 1; max_length= MAX_BLOB_WIDTH; }
|
||||
const char *func_name() const{return "uncompress";}
|
||||
String *val_str(String *) ZLIB_DEPENDED_FUNCTION
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uncompress>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uncompress>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1541,8 +1541,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_uuid>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_uuid>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1564,8 +1564,8 @@ public:
|
|||
String *val_str(String *);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
enum Functype functype() const { return DYNCOL_FUNC; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_create>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_create>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1578,8 +1578,8 @@ public:
|
|||
const char *func_name() const{ return "column_add"; }
|
||||
String *val_str(String *);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_add>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_add>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dyncol_json: public Item_str_func
|
||||
|
|
@ -1595,8 +1595,8 @@ public:
|
|||
collation.set(&my_charset_bin);
|
||||
decimals= 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_json>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_json>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -1637,8 +1637,8 @@ public:
|
|||
bool get_dyn_value(THD *thd, DYNAMIC_COLUMN_VALUE *val, String *tmp);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_dyncol_get>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_dyncol_get>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1649,8 +1649,8 @@ public:
|
|||
void fix_length_and_dec() { maybe_null= 1; max_length= MAX_BLOB_WIDTH; };
|
||||
const char *func_name() const{ return "column_list"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dyncol_list>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dyncol_list>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_STRFUNC_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -263,8 +263,8 @@ public:
|
|||
void register_as_with_rec_ref(With_element *with_elem);
|
||||
void init_expr_cache_tracker(THD *thd);
|
||||
|
||||
Item* build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* build_clone(THD *thd) { return 0; }
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
|
||||
bool wrap_tvc_in_derived_table(THD *thd, st_select_lex *tvc_sl);
|
||||
|
||||
|
|
|
|||
|
|
@ -792,8 +792,8 @@ public:
|
|||
}
|
||||
Item *copy_or_same(THD* thd);
|
||||
void remove();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_sum>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_sum>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
{
|
||||
|
|
@ -856,8 +856,8 @@ class Item_sum_count :public Item_sum_int
|
|||
return has_with_distinct() ? "count(distinct " : "count(";
|
||||
}
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_count>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
{
|
||||
|
|
@ -912,8 +912,8 @@ public:
|
|||
count= 0;
|
||||
Item_sum_sum::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_avg>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_avg>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
{
|
||||
|
|
@ -978,8 +978,8 @@ public:
|
|||
count= 0;
|
||||
Item_sum_num::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_variance>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_variance>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -999,8 +999,8 @@ class Item_sum_std :public Item_sum_variance
|
|||
Item *result_item(THD *thd, Field *field);
|
||||
const char *func_name() const { return "std("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_std>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_std>(thd, this); }
|
||||
};
|
||||
|
||||
// This class is a string or number function depending on num_func
|
||||
|
|
@ -1069,8 +1069,8 @@ public:
|
|||
bool add();
|
||||
const char *func_name() const { return "min("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_min>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_min>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1084,8 +1084,8 @@ public:
|
|||
bool add();
|
||||
const char *func_name() const { return "max("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_max>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_max>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1165,8 +1165,8 @@ public:
|
|||
bool add();
|
||||
const char *func_name() const { return "bit_or("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_or>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_or>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
|
|
@ -1182,8 +1182,8 @@ public:
|
|||
bool add();
|
||||
const char *func_name() const { return "bit_and("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_and>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_and>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
|
|
@ -1197,8 +1197,8 @@ public:
|
|||
bool add();
|
||||
const char *func_name() const { return "bit_xor("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_xor>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_xor>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
|
|
@ -1255,8 +1255,8 @@ public:
|
|||
my_decimal *val_decimal(my_decimal *dec) { return val_decimal_from_real(dec); }
|
||||
String *val_str(String *str) { return val_string_from_real(str); }
|
||||
double val_real();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_avg_field_double>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_avg_field_double>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1275,8 +1275,8 @@ public:
|
|||
longlong val_int() { return val_int_from_decimal(); }
|
||||
String *val_str(String *str) { return val_string_from_decimal(str); }
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_avg_field_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_avg_field_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1296,8 +1296,8 @@ public:
|
|||
{ return val_decimal_from_real(dec_buf); }
|
||||
bool is_null() { update_null_value(); return null_value; }
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_variance_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_variance_field>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1309,8 +1309,8 @@ public:
|
|||
{ }
|
||||
enum Type type() const { return FIELD_STD_ITEM; }
|
||||
double val_real();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_std_field>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_std_field>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1396,8 +1396,8 @@ class Item_sum_udf_float :public Item_udf_sum
|
|||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_float>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_float>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1418,8 +1418,8 @@ public:
|
|||
const Type_handler *type_handler() const { return &type_handler_longlong; }
|
||||
void fix_length_and_dec() { decimals=0; max_length=21; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_int>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_int>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1459,8 +1459,8 @@ public:
|
|||
const Type_handler *type_handler() const { return string_type_handler(); }
|
||||
void fix_length_and_dec();
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_str>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_str>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1480,8 +1480,8 @@ public:
|
|||
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
|
||||
void fix_length_and_dec() { fix_num_length_and_dec(); }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_udf_decimal>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_udf_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
#else /* Dummy functions to get sql_yacc.cc compiled */
|
||||
|
|
@ -1668,8 +1668,8 @@ public:
|
|||
virtual void print(String *str, enum_query_type query_type);
|
||||
virtual bool change_context_processor(void *cntx)
|
||||
{ context= (Name_resolution_context *)cntx; return FALSE; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_group_concat>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_group_concat>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_SUM_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ public:
|
|||
{
|
||||
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_period_add>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_period_add>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -84,8 +84,8 @@ public:
|
|||
decimals=0;
|
||||
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_period_diff>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_period_diff>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -109,8 +109,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_to_days>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_to_days>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -137,8 +137,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_to_seconds>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_to_seconds>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -160,8 +160,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dayofmonth>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dayofmonth>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -195,8 +195,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_month>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_month>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -217,8 +217,8 @@ public:
|
|||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_monthname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_monthname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -240,8 +240,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_dayofyear>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_dayofyear>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -263,8 +263,8 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_hour>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_hour>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -286,8 +286,8 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_minute>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_minute>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -309,8 +309,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_quarter>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_quarter>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -332,8 +332,8 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_second>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_second>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -365,8 +365,8 @@ public:
|
|||
{
|
||||
return arg_count == 2;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_week>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_week>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_yearweek :public Item_long_func
|
||||
|
|
@ -393,8 +393,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_yearweek>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_yearweek>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -418,8 +418,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_year>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_year>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -454,8 +454,8 @@ public:
|
|||
{
|
||||
return !has_date_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_weekday>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_weekday>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_dayname :public Item_func_weekday
|
||||
|
|
@ -533,8 +533,8 @@ public:
|
|||
}
|
||||
longlong int_op();
|
||||
my_decimal *decimal_op(my_decimal* buf);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_unix_timestamp>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_unix_timestamp>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -556,8 +556,8 @@ public:
|
|||
}
|
||||
longlong int_op();
|
||||
my_decimal *decimal_op(my_decimal* buf);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_time_to_sec>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_time_to_sec>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -684,8 +684,8 @@ public:
|
|||
Item_func_curtime_local(THD *thd, uint dec): Item_func_curtime(thd, dec) {}
|
||||
const char *func_name() const { return "curtime"; }
|
||||
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curtime_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curtime_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -695,8 +695,8 @@ public:
|
|||
Item_func_curtime_utc(THD *thd, uint dec): Item_func_curtime(thd, dec) {}
|
||||
const char *func_name() const { return "utc_time"; }
|
||||
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curtime_utc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curtime_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -723,8 +723,8 @@ public:
|
|||
Item_func_curdate_local(THD *thd): Item_func_curdate(thd) {}
|
||||
const char *func_name() const { return "curdate"; }
|
||||
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curdate_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curdate_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -734,8 +734,8 @@ public:
|
|||
Item_func_curdate_utc(THD *thd): Item_func_curdate(thd) {}
|
||||
const char *func_name() const { return "utc_date"; }
|
||||
void store_now_in_TIME(THD* thd, MYSQL_TIME *now_time);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_curdate_utc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_curdate_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -771,8 +771,8 @@ public:
|
|||
int save_in_field(Field *field, bool no_conversions);
|
||||
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
|
||||
virtual enum Functype functype() const { return NOW_FUNC; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_now_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_now_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -788,8 +788,8 @@ public:
|
|||
return mark_unsupported_function(func_name(), "()", arg,
|
||||
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_now_utc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_now_utc>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -812,8 +812,8 @@ public:
|
|||
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
|
||||
}
|
||||
virtual enum Functype functype() const { return SYSDATE_FUNC; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sysdate_local>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sysdate_local>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -831,8 +831,8 @@ public:
|
|||
{
|
||||
return has_date_args() || has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_from_days>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_from_days>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -859,8 +859,8 @@ public:
|
|||
return false;
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_date_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_date_format>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_time_format: public Item_func_date_format
|
||||
|
|
@ -870,8 +870,8 @@ public:
|
|||
Item_func_date_format(thd, a, b) { is_time_format= true; }
|
||||
const char *func_name() const { return "time_format"; }
|
||||
bool check_vcol_func_processor(void *arg) { return false; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_time_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_time_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -885,8 +885,8 @@ class Item_func_from_unixtime :public Item_datetimefunc
|
|||
const char *func_name() const { return "from_unixtime"; }
|
||||
void fix_length_and_dec();
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_from_unixtime>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_from_unixtime>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -930,8 +930,8 @@ class Item_func_convert_tz :public Item_datetimefunc
|
|||
}
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
void cleanup();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_convert_tz>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_convert_tz>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -948,8 +948,8 @@ public:
|
|||
maybe_null= true;
|
||||
}
|
||||
const char *func_name() const { return "sec_to_time"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_sec_to_time>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_sec_to_time>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -969,8 +969,8 @@ public:
|
|||
void print(String *str, enum_query_type query_type);
|
||||
enum precedence precedence() const { return ADDINTERVAL_PRECEDENCE; }
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_date_add_interval>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_date_add_interval>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1077,8 +1077,8 @@ class Item_extract :public Item_int_func
|
|||
}
|
||||
return true;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_extract>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_extract>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1110,8 +1110,8 @@ public:
|
|||
}
|
||||
void print(String *str, enum_query_type query_type);
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_char_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_char_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1135,8 +1135,8 @@ public:
|
|||
{
|
||||
args[0]->type_handler()->Item_date_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_date_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_date_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1153,8 +1153,8 @@ public:
|
|||
{
|
||||
args[0]->type_handler()->Item_time_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_time_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_time_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1171,8 +1171,8 @@ public:
|
|||
{
|
||||
args[0]->type_handler()->Item_datetime_typecast_fix_length_and_dec(this);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_datetime_typecast>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_datetime_typecast>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1185,8 +1185,8 @@ public:
|
|||
Item_datefunc(thd, a, b) {}
|
||||
const char *func_name() const { return "makedate"; }
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_makedate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_makedate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1203,8 +1203,8 @@ public:
|
|||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
const char *func_name() const { return "add_time"; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_add_time>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_add_time>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_timediff :public Item_timefunc
|
||||
|
|
@ -1221,8 +1221,8 @@ public:
|
|||
maybe_null= true;
|
||||
}
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_timediff>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_timediff>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_maketime :public Item_timefunc
|
||||
|
|
@ -1243,8 +1243,8 @@ public:
|
|||
}
|
||||
const char *func_name() const { return "maketime"; }
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_maketime>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_maketime>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1266,8 +1266,8 @@ public:
|
|||
{
|
||||
return !has_time_args();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_microsecond>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_microsecond>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1287,8 +1287,8 @@ public:
|
|||
maybe_null=1;
|
||||
}
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_timestamp_diff>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_timestamp_diff>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1313,8 +1313,8 @@ public:
|
|||
fix_length_and_charset(17, default_charset());
|
||||
}
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_get_format>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_get_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1333,8 +1333,8 @@ public:
|
|||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
const char *func_name() const { return "str_to_date"; }
|
||||
void fix_length_and_dec();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_str_to_date>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_str_to_date>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1346,8 +1346,8 @@ public:
|
|||
Item_func_last_day(THD *thd, Item *a): Item_datefunc(thd, a) {}
|
||||
const char *func_name() const { return "last_day"; }
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_last_day>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_last_day>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_TIMEFUNC_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@
|
|||
System Versioning items
|
||||
*/
|
||||
|
||||
#include "mariadb.h"
|
||||
#include "sql_priv.h"
|
||||
|
||||
#include "sql_class.h"
|
||||
#include "tztime.h"
|
||||
#include "item.h"
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ public:
|
|||
return "vtq_commit_ts";
|
||||
}
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_vtq_ts>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_vtq_ts>(thd, this); }
|
||||
void fix_length_and_dec() { fix_attributes_datetime(decimals); }
|
||||
};
|
||||
|
||||
|
|
@ -76,8 +76,8 @@ public:
|
|||
}
|
||||
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_vtq_id>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_vtq_id>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_vtq_trx_sees : public Item_bool_func
|
||||
|
|
@ -92,8 +92,8 @@ public:
|
|||
return "vtq_trx_sees";
|
||||
}
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_vtq_trx_sees>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_vtq_trx_sees>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_vtq_trx_sees_eq :
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ public:
|
|||
return "row_number";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_row_number>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_row_number>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -221,8 +221,8 @@ public:
|
|||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_rank>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_rank>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -291,8 +291,8 @@ class Item_sum_dense_rank: public Item_sum_int
|
|||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_dense_rank>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_dense_rank>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_hybrid_simple : public Item_sum,
|
||||
|
|
@ -354,8 +354,8 @@ class Item_sum_first_value : public Item_sum_hybrid_simple
|
|||
return "first_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_first_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_first_value>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -380,8 +380,8 @@ class Item_sum_last_value : public Item_sum_hybrid_simple
|
|||
return "last_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_last_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_last_value>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_nth_value : public Item_sum_hybrid_simple
|
||||
|
|
@ -400,8 +400,8 @@ class Item_sum_nth_value : public Item_sum_hybrid_simple
|
|||
return "nth_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_nth_value>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_nth_value>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_lead : public Item_sum_hybrid_simple
|
||||
|
|
@ -420,8 +420,8 @@ class Item_sum_lead : public Item_sum_hybrid_simple
|
|||
return "lead";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_lead>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_lead>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_sum_lag : public Item_sum_hybrid_simple
|
||||
|
|
@ -440,8 +440,8 @@ class Item_sum_lag : public Item_sum_hybrid_simple
|
|||
return "lag";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_lag>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_lag>(thd, this); }
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -532,8 +532,8 @@ class Item_sum_percent_rank: public Item_sum_window_with_row_count
|
|||
}
|
||||
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_percent_rank>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_percent_rank>(thd, this); }
|
||||
|
||||
private:
|
||||
longlong cur_rank; // Current rank of the current row.
|
||||
|
|
@ -619,8 +619,8 @@ class Item_sum_cume_dist: public Item_sum_window_with_row_count
|
|||
// requires.
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_cume_dist>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_cume_dist>(thd, this); }
|
||||
|
||||
ulonglong get_row_number()
|
||||
{
|
||||
|
|
@ -694,8 +694,8 @@ class Item_sum_ntile : public Item_sum_window_with_row_count
|
|||
|
||||
const Type_handler *type_handler() const { return &type_handler_longlong; }
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_ntile>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_ntile>(thd, this); }
|
||||
|
||||
private:
|
||||
longlong get_num_quantiles() { return args[0]->val_int(); }
|
||||
|
|
@ -825,8 +825,8 @@ public:
|
|||
// requires.
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_percentile_disc>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_percentile_disc>(thd, this); }
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
|
|
@ -955,8 +955,8 @@ public:
|
|||
// requires.
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_sum_percentile_cont>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_sum_percentile_cont>(thd, this); }
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
|
|
@ -1281,7 +1281,7 @@ public:
|
|||
|
||||
void print(String *str, enum_query_type query_type);
|
||||
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -247,8 +247,8 @@ public:
|
|||
Item_nodeset_func(thd, pxml) {}
|
||||
const char *func_name() const { return "xpath_rootelement"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_rootelement>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_rootelement>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -260,8 +260,8 @@ public:
|
|||
Item_nodeset_func(thd, a, b, pxml) {}
|
||||
const char *func_name() const { return "xpath_union"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_union>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_union>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -294,8 +294,8 @@ public:
|
|||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_selfbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_selfbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_selfbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -308,8 +308,8 @@ public:
|
|||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_childbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_childbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_childbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -324,8 +324,8 @@ public:
|
|||
need_self(need_self_arg) {}
|
||||
const char *func_name() const { return "xpath_descendantbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_descendantbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_descendantbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -340,8 +340,8 @@ public:
|
|||
need_self(need_self_arg) {}
|
||||
const char *func_name() const { return "xpath_ancestorbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -354,8 +354,8 @@ public:
|
|||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_parentbyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_parentbyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_parentbyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -368,8 +368,8 @@ public:
|
|||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_attributebyname"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_attributebyname>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_attributebyname>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -385,8 +385,8 @@ public:
|
|||
Item_nodeset_func(thd, a, b, pxml) {}
|
||||
const char *func_name() const { return "xpath_predicate"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_predicate>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_predicate>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -398,8 +398,8 @@ public:
|
|||
Item_nodeset_func(thd, a, b, pxml) { }
|
||||
const char *func_name() const { return "xpath_elementbyindex"; }
|
||||
String *val_nodeset(String *nodeset);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_func_elementbyindex>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_func_elementbyindex>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -426,8 +426,8 @@ public:
|
|||
}
|
||||
return args[0]->val_real() ? 1 : 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_xpath_cast_bool>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_xpath_cast_bool>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -440,8 +440,8 @@ public:
|
|||
Item_xpath_cast_number(THD *thd, Item *a): Item_real_func(thd, a) {}
|
||||
const char *func_name() const { return "xpath_cast_number"; }
|
||||
virtual double val_real() { return args[0]->val_real(); }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_xpath_cast_number>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_xpath_cast_number>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -457,8 +457,8 @@ public:
|
|||
String *val_nodeset(String *res)
|
||||
{ return string_cache; }
|
||||
void fix_length_and_dec() { max_length= MAX_BLOB_WIDTH; }
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_context_cache>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_context_cache>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -478,8 +478,8 @@ public:
|
|||
return ((MY_XPATH_FLT*)flt->ptr())->pos + 1;
|
||||
return 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xpath_position>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xpath_position>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -501,8 +501,8 @@ public:
|
|||
return predicate_supplied_context_size;
|
||||
return res->length() / sizeof(MY_XPATH_FLT);
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xpath_count>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xpath_count>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -546,8 +546,8 @@ public:
|
|||
}
|
||||
return sum;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xpath_sum>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xpath_sum>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -624,8 +624,8 @@ public:
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_nodeset_to_const_comparator>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_nodeset_to_const_comparator>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ public:
|
|||
Item_xml_str_func(thd, a, b) {}
|
||||
const char *func_name() const { return "extractvalue"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xml_extractvalue>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xml_extractvalue>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -112,8 +112,8 @@ public:
|
|||
Item_xml_str_func(thd, a, b, c) {}
|
||||
const char *func_name() const { return "updatexml"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||
{ return get_item_copy<Item_func_xml_update>(thd, mem_root, this); }
|
||||
Item *get_copy(THD *thd)
|
||||
{ return get_item_copy<Item_func_xml_update>(thd, this); }
|
||||
};
|
||||
|
||||
#endif /* ITEM_XMLFUNC_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -2391,7 +2391,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name, const char **errmsg)
|
|||
*errmsg = "Could not open log file";
|
||||
goto err;
|
||||
}
|
||||
if (init_io_cache(log, file, IO_SIZE*2, READ_CACHE, 0, 0,
|
||||
if (init_io_cache(log, file, binlog_file_cache_size, READ_CACHE, 0, 0,
|
||||
MYF(MY_WME|MY_DONT_CHECK_FILESIZE)))
|
||||
{
|
||||
sql_print_error("Failed to create a cache on log (file '%s')",
|
||||
|
|
|
|||
|
|
@ -508,6 +508,7 @@ ulong slave_ddl_exec_mode_options= SLAVE_EXEC_MODE_IDEMPOTENT;
|
|||
ulonglong slave_type_conversions_options;
|
||||
ulong thread_cache_size=0;
|
||||
ulonglong binlog_cache_size=0;
|
||||
ulonglong binlog_file_cache_size=0;
|
||||
ulonglong max_binlog_cache_size=0;
|
||||
ulong slave_max_allowed_packet= 0;
|
||||
ulonglong binlog_stmt_cache_size=0;
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ extern volatile ulong cached_thread_count;
|
|||
extern ulong what_to_log,flush_time;
|
||||
extern ulong max_prepared_stmt_count, prepared_stmt_count;
|
||||
extern ulong open_files_limit;
|
||||
extern ulonglong binlog_cache_size, binlog_stmt_cache_size;
|
||||
extern ulonglong binlog_cache_size, binlog_stmt_cache_size, binlog_file_cache_size;
|
||||
extern ulonglong max_binlog_cache_size, max_binlog_stmt_cache_size;
|
||||
extern ulong max_binlog_size;
|
||||
extern ulong slave_max_allowed_packet;
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ void best_access_path(JOIN *join, JOIN_TAB *s,
|
|||
|
||||
static Item *create_subq_in_equalities(THD *thd, SJ_MATERIALIZATION_INFO *sjm,
|
||||
Item_in_subselect *subq_pred);
|
||||
static void remove_sj_conds(THD *thd, Item **tree);
|
||||
static bool remove_sj_conds(THD *thd, Item **tree);
|
||||
static bool is_cond_sj_in_equality(Item *item);
|
||||
static bool sj_table_is_included(JOIN *join, JOIN_TAB *join_tab);
|
||||
static Item *remove_additional_cond(Item* conds);
|
||||
|
|
@ -1750,9 +1750,9 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
|
|||
*/
|
||||
Item_row *row= new (thd->mem_root) Item_row(thd, subq_lex->pre_fix);
|
||||
/* fix fields on subquery was call so they should be the same */
|
||||
DBUG_ASSERT(subq_pred->left_expr->cols() == row->cols());
|
||||
if (!row)
|
||||
DBUG_RETURN(TRUE);
|
||||
DBUG_ASSERT(subq_pred->left_expr->cols() == row->cols());
|
||||
nested_join->sj_outer_expr_list.push_back(&subq_pred->left_expr);
|
||||
Item_func_eq *item_eq=
|
||||
new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig, row);
|
||||
|
|
@ -1839,7 +1839,8 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
|
|||
}
|
||||
|
||||
parent_lex->have_merged_subqueries= TRUE;
|
||||
DBUG_RETURN(FALSE);
|
||||
/* Fatal error may have been set to by fix_after_pullout() */
|
||||
DBUG_RETURN(thd->is_fatal_error);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1880,6 +1881,7 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
|
|||
bool optimization_delayed= TRUE;
|
||||
TABLE_LIST *jtbm;
|
||||
char *tbl_alias;
|
||||
THD *thd= parent_join->thd;
|
||||
DBUG_ENTER("convert_subq_to_jtbm");
|
||||
|
||||
subq_pred->set_strategy(SUBS_MATERIALIZATION);
|
||||
|
|
@ -1887,8 +1889,8 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
|
|||
|
||||
*remove_item= TRUE;
|
||||
|
||||
if (!(tbl_alias= (char*)parent_join->thd->calloc(SUBQERY_TEMPTABLE_NAME_MAX_LEN)) ||
|
||||
!(jtbm= alloc_join_nest(parent_join->thd))) //todo: this is not a join nest!
|
||||
if (!(tbl_alias= (char*)thd->calloc(SUBQERY_TEMPTABLE_NAME_MAX_LEN)) ||
|
||||
!(jtbm= alloc_join_nest(thd))) //todo: this is not a join nest!
|
||||
{
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
|
@ -1900,13 +1902,13 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
|
|||
|
||||
/* Nests do not participate in those 'chains', so: */
|
||||
/* jtbm->next_leaf= jtbm->next_local= jtbm->next_global == NULL*/
|
||||
emb_join_list->push_back(jtbm, parent_join->thd->mem_root);
|
||||
emb_join_list->push_back(jtbm, thd->mem_root);
|
||||
|
||||
/*
|
||||
Inject the jtbm table into TABLE_LIST::next_leaf list, so that
|
||||
make_join_statistics() and co. can find it.
|
||||
*/
|
||||
parent_lex->leaf_tables.push_back(jtbm, parent_join->thd->mem_root);
|
||||
parent_lex->leaf_tables.push_back(jtbm, thd->mem_root);
|
||||
|
||||
if (subq_pred->unit->first_select()->options & OPTION_SCHEMA_TABLE)
|
||||
parent_lex->options |= OPTION_SCHEMA_TABLE;
|
||||
|
|
@ -1931,7 +1933,7 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
|
|||
subq_pred->unit->first_select()->select_number);
|
||||
jtbm->alias= tbl_alias;
|
||||
parent_join->table_count++;
|
||||
DBUG_RETURN(FALSE);
|
||||
DBUG_RETURN(thd->is_fatal_error);
|
||||
}
|
||||
subselect_hash_sj_engine *hash_sj_engine=
|
||||
((subselect_hash_sj_engine*)subq_pred->engine);
|
||||
|
|
@ -1954,27 +1956,10 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
|
|||
jtbm->alias= tbl_alias;
|
||||
|
||||
parent_lex->have_merged_subqueries= TRUE;
|
||||
#if 0
|
||||
/* Inject sj_on_expr into the parent's WHERE or ON */
|
||||
if (emb_tbl_nest)
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
/*emb_tbl_nest->on_expr= and_items(emb_tbl_nest->on_expr,
|
||||
sj_nest->sj_on_expr);
|
||||
emb_tbl_nest->on_expr->fix_fields(parent_join->thd, &emb_tbl_nest->on_expr);
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Inject into the WHERE */
|
||||
parent_join->conds= and_items(parent_join->conds, conds);
|
||||
parent_join->conds->fix_fields(parent_join->thd, &parent_join->conds);
|
||||
parent_join->select_lex->where= parent_join->conds;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Don't unlink the child subselect, as the subquery will be used. */
|
||||
|
||||
DBUG_RETURN(FALSE);
|
||||
DBUG_RETURN(thd->is_fatal_error);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1989,6 +1974,9 @@ static TABLE_LIST *alloc_join_nest(THD *thd)
|
|||
return tbl;
|
||||
}
|
||||
|
||||
/*
|
||||
@Note thd->is_fatal_error can be set in case of OOM
|
||||
*/
|
||||
|
||||
void fix_list_after_tbl_changes(SELECT_LEX *new_parent, List<TABLE_LIST> *tlist)
|
||||
{
|
||||
|
|
@ -3718,6 +3706,11 @@ bool setup_sj_materialization_part1(JOIN_TAB *sjm_tab)
|
|||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
@retval
|
||||
FALSE ok
|
||||
TRUE error
|
||||
*/
|
||||
|
||||
bool setup_sj_materialization_part2(JOIN_TAB *sjm_tab)
|
||||
{
|
||||
|
|
@ -3730,8 +3723,6 @@ bool setup_sj_materialization_part2(JOIN_TAB *sjm_tab)
|
|||
SJ_MATERIALIZATION_INFO *sjm= emb_sj_nest->sj_mat_info;
|
||||
THD *thd= tab->join->thd;
|
||||
uint i;
|
||||
//List<Item> &item_list= emb_sj_nest->sj_subq_pred->unit->first_select()->item_list;
|
||||
//List_iterator<Item> it(item_list);
|
||||
|
||||
if (!sjm->is_sj_scan)
|
||||
{
|
||||
|
|
@ -3781,6 +3772,8 @@ bool setup_sj_materialization_part2(JOIN_TAB *sjm_tab)
|
|||
null_count ? cur_ref_buff : 0,
|
||||
cur_key_part->length, tab_ref->items[i],
|
||||
FALSE);
|
||||
if (!*ref_key)
|
||||
DBUG_RETURN(TRUE);
|
||||
cur_ref_buff+= cur_key_part->store_length;
|
||||
}
|
||||
*ref_key= NULL; /* End marker. */
|
||||
|
|
@ -3806,9 +3799,9 @@ bool setup_sj_materialization_part2(JOIN_TAB *sjm_tab)
|
|||
*/
|
||||
for (i= 0; i < sjm->tables; i++)
|
||||
{
|
||||
remove_sj_conds(thd, &tab[i].select_cond);
|
||||
if (tab[i].select)
|
||||
remove_sj_conds(thd, &tab[i].select->cond);
|
||||
if (remove_sj_conds(thd, &tab[i].select_cond) ||
|
||||
(tab[i].select && remove_sj_conds(thd, &tab[i].select->cond)))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
if (!(sjm->in_equality= create_subq_in_equalities(thd, sjm,
|
||||
emb_sj_nest->sj_subq_pred)))
|
||||
|
|
@ -3845,7 +3838,9 @@ bool setup_sj_materialization_part2(JOIN_TAB *sjm_tab)
|
|||
temptable record, we copy its columns to their corresponding columns
|
||||
in the record buffers for the source tables.
|
||||
*/
|
||||
sjm->copy_field= new Copy_field[sjm->sjm_table_cols.elements];
|
||||
if (!(sjm->copy_field= new Copy_field[sjm->sjm_table_cols.elements]))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
//it.rewind();
|
||||
Ref_ptr_array p_items= emb_sj_nest->sj_subq_pred->unit->first_select()->ref_pointer_array;
|
||||
for (uint i=0; i < sjm->sjm_table_cols.elements; i++)
|
||||
|
|
@ -3972,16 +3967,20 @@ static Item *create_subq_in_equalities(THD *thd, SJ_MATERIALIZATION_INFO *sjm,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
@retval
|
||||
0 ok
|
||||
1 error
|
||||
*/
|
||||
|
||||
|
||||
static void remove_sj_conds(THD *thd, Item **tree)
|
||||
static bool remove_sj_conds(THD *thd, Item **tree)
|
||||
{
|
||||
if (*tree)
|
||||
{
|
||||
if (is_cond_sj_in_equality(*tree))
|
||||
{
|
||||
*tree= NULL;
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
else if ((*tree)->type() == Item::COND_ITEM)
|
||||
{
|
||||
|
|
@ -3990,12 +3989,19 @@ static void remove_sj_conds(THD *thd, Item **tree)
|
|||
while ((item= li++))
|
||||
{
|
||||
if (is_cond_sj_in_equality(item))
|
||||
li.replace(new (thd->mem_root) Item_int(thd, 1));
|
||||
{
|
||||
Item_int *tmp= new (thd->mem_root) Item_int(thd, 1);
|
||||
if (!tmp)
|
||||
return 1;
|
||||
li.replace(tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Check if given Item was injected by semi-join equality */
|
||||
static bool is_cond_sj_in_equality(Item *item)
|
||||
{
|
||||
|
|
@ -4183,7 +4189,7 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd)
|
|||
share->db_plugin= ha_lock_engine(0, heap_hton);
|
||||
table->file= get_new_handler(share, &table->mem_root,
|
||||
share->db_type());
|
||||
DBUG_ASSERT(uniq_tuple_length_arg <= table->file->max_key_length());
|
||||
DBUG_ASSERT(!table->file || uniq_tuple_length_arg <= table->file->max_key_length());
|
||||
}
|
||||
if (!table->file)
|
||||
goto err;
|
||||
|
|
@ -5302,6 +5308,9 @@ TABLE *create_dummy_tmp_table(THD *thd)
|
|||
sjm_table_param.field_count= 1;
|
||||
List<Item> sjm_table_cols;
|
||||
Item *column_item= new (thd->mem_root) Item_int(thd, 1);
|
||||
if (!column_item)
|
||||
DBUG_RETURN(NULL);
|
||||
|
||||
sjm_table_cols.push_back(column_item, thd->mem_root);
|
||||
if (!(table= create_tmp_table(thd, &sjm_table_param,
|
||||
sjm_table_cols, (ORDER*) 0,
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
DBUG_ASSERT(0); // impossible
|
||||
return mark_unsupported_function("proc", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
};
|
||||
|
||||
class Item_proc_real :public Item_proc
|
||||
|
|
|
|||
|
|
@ -258,4 +258,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
typedef Bounds_checked_array<Item*> Ref_ptr_array;
|
||||
|
||||
#endif /* SQL_ARRAY_INCLUDED */
|
||||
|
|
|
|||
|
|
@ -8555,7 +8555,8 @@ int init_ftfuncs(THD *thd, SELECT_LEX *select_lex, bool no_order)
|
|||
Item_func_match *ifm;
|
||||
|
||||
while ((ifm=li++))
|
||||
ifm->init_search(thd, no_order);
|
||||
if (ifm->init_search(thd, no_order))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2082,11 +2082,6 @@ typedef struct
|
|||
|
||||
extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
|
||||
|
||||
class THD;
|
||||
#ifndef DBUG_OFF
|
||||
void dbug_serve_apcs(THD *thd, int n_calls);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@class THD
|
||||
For each client connection we create a separate thread with THD serving as
|
||||
|
|
@ -6363,6 +6358,10 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
void dbug_serve_apcs(THD *thd, int n_calls);
|
||||
#endif
|
||||
|
||||
class ScopedStatementReplication
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ HASH global_index_stats;
|
|||
extern mysql_mutex_t LOCK_global_user_client_stats;
|
||||
extern mysql_mutex_t LOCK_global_table_stats;
|
||||
extern mysql_mutex_t LOCK_global_index_stats;
|
||||
extern vio_keepalive_opts opt_vio_keepalive;
|
||||
|
||||
/*
|
||||
Get structure for logging connection data for the current user
|
||||
|
|
@ -1064,7 +1065,8 @@ static int check_connection(THD *thd)
|
|||
bzero((char*) &net->vio->remote, sizeof(net->vio->remote));
|
||||
}
|
||||
vio_keepalive(net->vio, TRUE);
|
||||
|
||||
vio_set_keepalive_options(net->vio, &opt_vio_keepalive);
|
||||
|
||||
if (thd->packet.alloc(thd->variables.net_buffer_length))
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1725,8 +1725,7 @@ bool mysql_upgrade_db(THD *thd, LEX_CSTRING *old_db)
|
|||
DBUG_PRINT("info",("Examining: %s", file->name));
|
||||
|
||||
/* skiping non-FRM files */
|
||||
if (my_strcasecmp(files_charset_info,
|
||||
(extension= fn_rext(file->name)), reg_ext))
|
||||
if (!(extension= (char*) fn_frm_ext(file->name)))
|
||||
continue;
|
||||
|
||||
/* A frm file found, add the table info rename list */
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ Explain_delete* Delete_plan::save_explain_delete_data(MEM_ROOT *mem_root, THD *t
|
|||
Explain_query *query= thd->lex->explain;
|
||||
Explain_delete *explain=
|
||||
new (mem_root) Explain_delete(mem_root, thd->lex->analyze_stmt);
|
||||
if (!explain)
|
||||
return 0;
|
||||
|
||||
if (deleting_all_rows)
|
||||
{
|
||||
|
|
@ -71,8 +73,9 @@ Explain_delete* Delete_plan::save_explain_delete_data(MEM_ROOT *mem_root, THD *t
|
|||
else
|
||||
{
|
||||
explain->deleting_all_rows= false;
|
||||
Update_plan::save_explain_data_intern(mem_root, explain,
|
||||
thd->lex->analyze_stmt);
|
||||
if (Update_plan::save_explain_data_intern(mem_root, explain,
|
||||
thd->lex->analyze_stmt))
|
||||
return 0;
|
||||
}
|
||||
|
||||
query->add_upd_del_plan(explain);
|
||||
|
|
@ -86,13 +89,16 @@ Update_plan::save_explain_update_data(MEM_ROOT *mem_root, THD *thd)
|
|||
Explain_query *query= thd->lex->explain;
|
||||
Explain_update* explain=
|
||||
new (mem_root) Explain_update(mem_root, thd->lex->analyze_stmt);
|
||||
save_explain_data_intern(mem_root, explain, thd->lex->analyze_stmt);
|
||||
if (!explain)
|
||||
return 0;
|
||||
if (save_explain_data_intern(mem_root, explain, thd->lex->analyze_stmt))
|
||||
return 0;
|
||||
query->add_upd_del_plan(explain);
|
||||
return explain;
|
||||
}
|
||||
|
||||
|
||||
void Update_plan::save_explain_data_intern(MEM_ROOT *mem_root,
|
||||
bool Update_plan::save_explain_data_intern(MEM_ROOT *mem_root,
|
||||
Explain_update *explain,
|
||||
bool is_analyze)
|
||||
{
|
||||
|
|
@ -105,13 +111,13 @@ void Update_plan::save_explain_data_intern(MEM_ROOT *mem_root,
|
|||
if (impossible_where)
|
||||
{
|
||||
explain->impossible_where= true;
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (no_partitions)
|
||||
{
|
||||
explain->no_partitions= true;
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (is_analyze)
|
||||
|
|
@ -162,7 +168,8 @@ void Update_plan::save_explain_data_intern(MEM_ROOT *mem_root,
|
|||
explain->where_cond= select? select->cond: NULL;
|
||||
|
||||
if (using_filesort)
|
||||
explain->filesort_tracker= new (mem_root) Filesort_tracker(is_analyze);
|
||||
if (!(explain->filesort_tracker= new (mem_root) Filesort_tracker(is_analyze)))
|
||||
return 1;
|
||||
explain->using_io_buffer= using_io_buffer;
|
||||
|
||||
append_possible_keys(mem_root, explain->possible_keys, table,
|
||||
|
|
@ -211,6 +218,7 @@ void Update_plan::save_explain_data_intern(MEM_ROOT *mem_root,
|
|||
if (!(unit->item && unit->item->eliminated))
|
||||
explain->add_child(unit->first_select()->select_number);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -428,7 +436,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||
query_type= THD::STMT_QUERY_TYPE;
|
||||
error= -1;
|
||||
deleted= maybe_deleted;
|
||||
query_plan.save_explain_delete_data(thd->mem_root, thd);
|
||||
if (!query_plan.save_explain_delete_data(thd->mem_root, thd))
|
||||
error= 1;
|
||||
goto cleanup;
|
||||
}
|
||||
if (error != HA_ERR_WRONG_COMMAND)
|
||||
|
|
@ -546,7 +555,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||
if (thd->lex->describe)
|
||||
goto produce_explain_and_leave;
|
||||
|
||||
explain= query_plan.save_explain_delete_data(thd->mem_root, thd);
|
||||
if (!(explain= query_plan.save_explain_delete_data(thd->mem_root, thd)))
|
||||
goto got_error;
|
||||
ANALYZE_START_TRACKING(&explain->command_tracker);
|
||||
|
||||
DBUG_EXECUTE_IF("show_explain_probe_delete_exec_start",
|
||||
|
|
@ -598,7 +608,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||
if (error)
|
||||
goto got_error;
|
||||
|
||||
init_ftfuncs(thd, select_lex, 1);
|
||||
if (init_ftfuncs(thd, select_lex, 1))
|
||||
goto got_error;
|
||||
|
||||
if (table->prepare_triggers_for_delete_stmt_or_event())
|
||||
{
|
||||
|
|
@ -812,7 +823,8 @@ produce_explain_and_leave:
|
|||
We come here for various "degenerate" query plans: impossible WHERE,
|
||||
no-partitions-used, impossible-range, etc.
|
||||
*/
|
||||
query_plan.save_explain_delete_data(thd->mem_root, thd);
|
||||
if (!(query_plan.save_explain_delete_data(thd->mem_root, thd)))
|
||||
goto got_error;
|
||||
|
||||
send_nothing_and_leave:
|
||||
/*
|
||||
|
|
@ -1112,7 +1124,7 @@ multi_delete::initialize_tables(JOIN *join)
|
|||
MEM_STRIP_BUF_SIZE);
|
||||
}
|
||||
init_ftfuncs(thd, thd->lex->current_select, 1);
|
||||
DBUG_RETURN(thd->is_fatal_error != 0);
|
||||
DBUG_RETURN(thd->is_fatal_error);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1382,7 +1382,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
|
|||
continue;
|
||||
extracted_cond_copy= !sl->next_select() ?
|
||||
extracted_cond :
|
||||
extracted_cond->build_clone(thd, thd->mem_root);
|
||||
extracted_cond->build_clone(thd);
|
||||
if (!extracted_cond_copy)
|
||||
continue;
|
||||
|
||||
|
|
@ -1412,7 +1412,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
|
|||
*/
|
||||
extracted_cond_copy= !sl->next_select() ?
|
||||
extracted_cond :
|
||||
extracted_cond->build_clone(thd, thd->mem_root);
|
||||
extracted_cond->build_clone(thd);
|
||||
if (!extracted_cond_copy)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -1143,33 +1143,37 @@ void Explain_table_access::fill_key_len_str(String *key_len_str) const
|
|||
}
|
||||
|
||||
|
||||
void Explain_index_use::set(MEM_ROOT *mem_root, KEY *key, uint key_len_arg)
|
||||
bool Explain_index_use::set(MEM_ROOT *mem_root, KEY *key, uint key_len_arg)
|
||||
{
|
||||
set_pseudo_key(mem_root, key->name.str);
|
||||
if (set_pseudo_key(mem_root, key->name.str))
|
||||
return 1;
|
||||
|
||||
key_len= key_len_arg;
|
||||
uint len= 0;
|
||||
for (uint i= 0; i < key->usable_key_parts; i++)
|
||||
{
|
||||
key_parts_list.append_str(mem_root,
|
||||
key->key_part[i].field->field_name.str);
|
||||
if (!key_parts_list.append_str(mem_root,
|
||||
key->key_part[i].field->field_name.str))
|
||||
return 1;
|
||||
len += key->key_part[i].store_length;
|
||||
if (len >= key_len_arg)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void Explain_index_use::set_pseudo_key(MEM_ROOT *root, const char* key_name_arg)
|
||||
bool Explain_index_use::set_pseudo_key(MEM_ROOT *root, const char* key_name_arg)
|
||||
{
|
||||
if (key_name_arg)
|
||||
{
|
||||
size_t name_len= strlen(key_name_arg);
|
||||
if ((key_name= (char*)alloc_root(root, name_len+1)))
|
||||
memcpy(key_name, key_name_arg, name_len+1);
|
||||
if (!(key_name= strdup_root(root, key_name_arg)))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
key_name= NULL;
|
||||
key_len= ~(uint) 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2450,8 +2454,11 @@ int Explain_range_checked_fer::append_possible_keys_stat(MEM_ROOT *alloc,
|
|||
for (j= 0; j < table->s->keys; j++)
|
||||
{
|
||||
if (possible_keys.is_set(j))
|
||||
keys_stat_names[j]= key_set.append_str(alloc,
|
||||
table->key_info[j].name.str);
|
||||
{
|
||||
if (!(keys_stat_names[j]= key_set.append_str(alloc,
|
||||
table->key_info[j].name.str)))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
keys_stat_names[j]= NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -589,8 +589,8 @@ public:
|
|||
key_name= NULL;
|
||||
key_len= (uint)-1;
|
||||
}
|
||||
void set(MEM_ROOT *root, KEY *key_name, uint key_len_arg);
|
||||
void set_pseudo_key(MEM_ROOT *root, const char *key_name);
|
||||
bool set(MEM_ROOT *root, KEY *key_name, uint key_len_arg);
|
||||
bool set_pseudo_key(MEM_ROOT *root, const char *key_name);
|
||||
|
||||
inline const char *get_key_name() const { return key_name; }
|
||||
inline uint get_key_len() const { return key_len; }
|
||||
|
|
|
|||
|
|
@ -2571,10 +2571,11 @@ finish:
|
|||
BNLH, BKA or BKAH) to the data structure
|
||||
|
||||
RETURN VALUE
|
||||
none
|
||||
0 ok
|
||||
1 error
|
||||
*/
|
||||
|
||||
void JOIN_CACHE::save_explain_data(EXPLAIN_BKA_TYPE *explain)
|
||||
bool JOIN_CACHE::save_explain_data(EXPLAIN_BKA_TYPE *explain)
|
||||
{
|
||||
explain->incremental= MY_TEST(prev_cache);
|
||||
|
||||
|
|
@ -2596,6 +2597,7 @@ void JOIN_CACHE::save_explain_data(EXPLAIN_BKA_TYPE *explain)
|
|||
default:
|
||||
DBUG_ASSERT(0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2608,7 +2610,7 @@ THD *JOIN_CACHE::thd()
|
|||
}
|
||||
|
||||
|
||||
static void add_mrr_explain_info(String *str, uint mrr_mode, handler *file)
|
||||
static bool add_mrr_explain_info(String *str, uint mrr_mode, handler *file)
|
||||
{
|
||||
char mrr_str_buf[128]={0};
|
||||
int len;
|
||||
|
|
@ -2617,22 +2619,30 @@ static void add_mrr_explain_info(String *str, uint mrr_mode, handler *file)
|
|||
if (len > 0)
|
||||
{
|
||||
if (str->length())
|
||||
str->append(STRING_WITH_LEN("; "));
|
||||
str->append(mrr_str_buf, len);
|
||||
{
|
||||
if (str->append(STRING_WITH_LEN("; ")))
|
||||
return 1;
|
||||
}
|
||||
if (str->append(mrr_str_buf, len))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
void JOIN_CACHE_BKA::save_explain_data(EXPLAIN_BKA_TYPE *explain)
|
||||
{
|
||||
JOIN_CACHE::save_explain_data(explain);
|
||||
add_mrr_explain_info(&explain->mrr_type, mrr_mode, join_tab->table->file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void JOIN_CACHE_BKAH::save_explain_data(EXPLAIN_BKA_TYPE *explain)
|
||||
bool JOIN_CACHE_BKA::save_explain_data(EXPLAIN_BKA_TYPE *explain)
|
||||
{
|
||||
JOIN_CACHE::save_explain_data(explain);
|
||||
add_mrr_explain_info(&explain->mrr_type, mrr_mode, join_tab->table->file);
|
||||
if (JOIN_CACHE::save_explain_data(explain))
|
||||
return 1;
|
||||
return add_mrr_explain_info(&explain->mrr_type, mrr_mode, join_tab->table->file);
|
||||
}
|
||||
|
||||
|
||||
bool JOIN_CACHE_BKAH::save_explain_data(EXPLAIN_BKA_TYPE *explain)
|
||||
{
|
||||
if (JOIN_CACHE::save_explain_data(explain))
|
||||
return 1;
|
||||
return add_mrr_explain_info(&explain->mrr_type, mrr_mode, join_tab->table->file);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -662,7 +662,7 @@ public:
|
|||
enum_nested_loop_state join_records(bool skip_last);
|
||||
|
||||
/* Add a comment on the join algorithm employed by the join cache */
|
||||
virtual void save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
virtual bool save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
|
||||
THD *thd();
|
||||
|
||||
|
|
@ -1340,7 +1340,7 @@ public:
|
|||
/* Check index condition of the joined table for a record from BKA cache */
|
||||
bool skip_index_tuple(range_id_t range_info);
|
||||
|
||||
void save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
bool save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1431,5 +1431,5 @@ public:
|
|||
/* Check index condition of the joined table for a record from BKAH cache */
|
||||
bool skip_index_tuple(range_id_t range_info);
|
||||
|
||||
void save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
bool save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7208,7 +7208,7 @@ Item *st_select_lex::build_cond_for_grouping_fields(THD *thd, Item *cond,
|
|||
if (no_top_clones)
|
||||
return cond;
|
||||
cond->clear_extraction_flag();
|
||||
return cond->build_clone(thd, thd->mem_root);
|
||||
return cond->build_clone(thd);
|
||||
}
|
||||
if (cond->type() == Item::COND_ITEM)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "sql_trigger.h"
|
||||
#include "sp.h" // enum stored_procedure_type
|
||||
#include "sql_tvc.h"
|
||||
#include "item.h"
|
||||
|
||||
/* YACC and LEX Definitions */
|
||||
|
||||
|
|
@ -2607,7 +2608,7 @@ public:
|
|||
|
||||
Explain_update* save_explain_update_data(MEM_ROOT *mem_root, THD *thd);
|
||||
protected:
|
||||
void save_explain_data_intern(MEM_ROOT *mem_root, Explain_update *eu, bool is_analyze);
|
||||
bool save_explain_data_intern(MEM_ROOT *mem_root, Explain_update *eu, bool is_analyze);
|
||||
public:
|
||||
virtual ~Update_plan() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2000, 2016 Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2016 MariaDB
|
||||
Copyright (c) 2009, 2016, 2017 MariaDB
|
||||
|
||||
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
|
||||
|
|
@ -1028,7 +1028,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
|
|||
union_part= unit_arg->is_unit_op();
|
||||
|
||||
if (select_lex->handle_derived(thd->lex, DT_PREPARE))
|
||||
DBUG_RETURN(1);
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
thd->lex->current_select->context_analysis_place= NO_MATTER;
|
||||
thd->lex->current_select->is_item_list_lookup= 1;
|
||||
|
|
@ -1267,6 +1267,8 @@ JOIN::prepare(TABLE_LIST *tables_init,
|
|||
(*ord->item)->field_type() == MYSQL_TYPE_BIT)
|
||||
{
|
||||
Item_field *field= new (thd->mem_root) Item_field(thd, *(Item_field**)ord->item);
|
||||
if (!field)
|
||||
DBUG_RETURN(-1);
|
||||
int el= all_fields.elements;
|
||||
ref_ptrs[el]= field;
|
||||
all_fields.push_front(field, thd->mem_root);
|
||||
|
|
@ -1439,14 +1441,16 @@ err:
|
|||
DBUG_RETURN(res); /* purecov: inspected */
|
||||
}
|
||||
|
||||
void JOIN::build_explain()
|
||||
|
||||
bool JOIN::build_explain()
|
||||
{
|
||||
create_explain_query_if_not_exists(thd->lex, thd->mem_root);
|
||||
have_query_plan= QEP_AVAILABLE;
|
||||
save_explain_data(thd->lex->explain, false /* can overwrite */,
|
||||
need_tmp,
|
||||
!skip_sort_order && !no_order && (order || group_list),
|
||||
select_distinct);
|
||||
if (save_explain_data(thd->lex->explain, false /* can overwrite */,
|
||||
need_tmp,
|
||||
!skip_sort_order && !no_order && (order || group_list),
|
||||
select_distinct))
|
||||
return 1;
|
||||
uint select_nr= select_lex->select_number;
|
||||
JOIN_TAB *curr_tab= join_tab + exec_join_tab_cnt();
|
||||
for (uint i= 0; i < aggr_tables; i++, curr_tab++)
|
||||
|
|
@ -1464,8 +1468,10 @@ void JOIN::build_explain()
|
|||
get_using_temporary_read_tracker();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int JOIN::optimize()
|
||||
{
|
||||
int res= 0;
|
||||
|
|
@ -1485,7 +1491,7 @@ int JOIN::optimize()
|
|||
init_state == JOIN::OPTIMIZATION_PHASE_1_DONE)
|
||||
{
|
||||
if (!res && have_query_plan != QEP_DELETED)
|
||||
build_explain();
|
||||
res= build_explain();
|
||||
optimization_state= JOIN::OPTIMIZATION_DONE;
|
||||
}
|
||||
return res;
|
||||
|
|
@ -2079,6 +2085,9 @@ int JOIN::optimize_stage2()
|
|||
{
|
||||
ref_item= substitute_for_best_equal_field(thd, tab, ref_item,
|
||||
equals, map2table);
|
||||
if (thd->is_fatal_error)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (first_inner)
|
||||
{
|
||||
equals= first_inner->cond_equal;
|
||||
|
|
@ -2391,7 +2400,8 @@ int JOIN::optimize_stage2()
|
|||
|
||||
/* Perform FULLTEXT search before all regular searches */
|
||||
if (!(select_options & SELECT_DESCRIBE))
|
||||
init_ftfuncs(thd, select_lex, MY_TEST(order));
|
||||
if (init_ftfuncs(thd, select_lex, MY_TEST(order)))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
/*
|
||||
It's necessary to check const part of HAVING cond as
|
||||
|
|
@ -2778,7 +2788,8 @@ bool JOIN::make_aggr_tables_info()
|
|||
|
||||
if (gbh)
|
||||
{
|
||||
pushdown_query= new (thd->mem_root) Pushdown_query(select_lex, gbh);
|
||||
if (!(pushdown_query= new (thd->mem_root) Pushdown_query(select_lex, gbh)))
|
||||
DBUG_RETURN(1);
|
||||
/*
|
||||
We must store rows in the tmp table if we need to do an ORDER BY
|
||||
or DISTINCT and the storage handler can't handle it.
|
||||
|
|
@ -2795,7 +2806,8 @@ bool JOIN::make_aggr_tables_info()
|
|||
curr_tab->ref.key= -1;
|
||||
curr_tab->join= this;
|
||||
|
||||
curr_tab->tmp_table_param= new TMP_TABLE_PARAM(tmp_table_param);
|
||||
if (!(curr_tab->tmp_table_param= new TMP_TABLE_PARAM(tmp_table_param)))
|
||||
DBUG_RETURN(1);
|
||||
TABLE* table= create_tmp_table(thd, curr_tab->tmp_table_param,
|
||||
all_fields,
|
||||
NULL, query.distinct,
|
||||
|
|
@ -2805,7 +2817,8 @@ bool JOIN::make_aggr_tables_info()
|
|||
if (!table)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
curr_tab->aggr= new (thd->mem_root) AGGR_OP(curr_tab);
|
||||
if (!(curr_tab->aggr= new (thd->mem_root) AGGR_OP(curr_tab)))
|
||||
DBUG_RETURN(1);
|
||||
curr_tab->aggr->set_write_func(::end_send);
|
||||
curr_tab->table= table;
|
||||
/*
|
||||
|
|
@ -3245,7 +3258,8 @@ bool JOIN::make_aggr_tables_info()
|
|||
curr_tab= join_tab + exec_join_tab_cnt() + aggr_tables - 1;
|
||||
if (select_lex->window_funcs.elements)
|
||||
{
|
||||
curr_tab->window_funcs_step= new Window_funcs_computation;
|
||||
if (!(curr_tab->window_funcs_step= new Window_funcs_computation))
|
||||
DBUG_RETURN(true);
|
||||
if (curr_tab->window_funcs_step->setup(thd, &select_lex->window_funcs,
|
||||
curr_tab))
|
||||
DBUG_RETURN(true);
|
||||
|
|
@ -3287,7 +3301,8 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
|
|||
!select_lex->with_sum_func) ?
|
||||
select_limit : HA_POS_ERROR;
|
||||
|
||||
tab->tmp_table_param= new TMP_TABLE_PARAM(tmp_table_param);
|
||||
if (!(tab->tmp_table_param= new TMP_TABLE_PARAM(tmp_table_param)))
|
||||
DBUG_RETURN(true);
|
||||
tab->tmp_table_param->skip_create_table= true;
|
||||
TABLE* table= create_tmp_table(thd, tab->tmp_table_param, *table_fields,
|
||||
table_group, distinct,
|
||||
|
|
@ -3301,8 +3316,7 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
|
|||
DBUG_ASSERT(tab > tab->join->join_tab || !top_join_tab_count || !tables_list);
|
||||
if (tab > join_tab)
|
||||
(tab - 1)->next_select= sub_select_postjoin_aggr;
|
||||
tab->aggr= new (thd->mem_root) AGGR_OP(tab);
|
||||
if (!tab->aggr)
|
||||
if (!(tab->aggr= new (thd->mem_root) AGGR_OP(tab)))
|
||||
goto err;
|
||||
tab->table= table;
|
||||
table->reginfo.join_tab= tab;
|
||||
|
|
@ -3452,33 +3466,42 @@ bool JOIN::setup_subquery_caches()
|
|||
select_lex->expr_cache_may_be_used[IN_ON] ||
|
||||
select_lex->expr_cache_may_be_used[NO_MATTER])
|
||||
{
|
||||
if (conds)
|
||||
conds= conds->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
JOIN_TAB *tab;
|
||||
if (conds &&
|
||||
!(conds= conds->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
for (tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITHOUT_CONST_TABLES);
|
||||
tab; tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS))
|
||||
{
|
||||
if (tab->select_cond)
|
||||
tab->select_cond=
|
||||
tab->select_cond->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
if (tab->select_cond &&
|
||||
!(tab->select_cond=
|
||||
tab->select_cond->transform(thd,
|
||||
&Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
if (tab->cache_select && tab->cache_select->cond)
|
||||
tab->cache_select->cond=
|
||||
tab->cache_select->
|
||||
cond->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
|
||||
if (!(tab->cache_select->cond=
|
||||
tab->cache_select->
|
||||
cond->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
if (having)
|
||||
having= having->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
if (having &&
|
||||
!(having= having->transform(thd,
|
||||
&Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
if (tmp_having)
|
||||
{
|
||||
DBUG_ASSERT(having == NULL);
|
||||
tmp_having= tmp_having->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
if (!(tmp_having=
|
||||
tmp_having->transform(thd,
|
||||
&Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
}
|
||||
if (select_lex->expr_cache_may_be_used[SELECT_LIST] ||
|
||||
|
|
@ -3489,9 +3512,11 @@ bool JOIN::setup_subquery_caches()
|
|||
Item *item;
|
||||
while ((item= li++))
|
||||
{
|
||||
Item *new_item=
|
||||
item->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
Item *new_item;
|
||||
if (!(new_item=
|
||||
item->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
if (new_item != item)
|
||||
{
|
||||
thd->change_item_tree(li.ref(), new_item);
|
||||
|
|
@ -3499,18 +3524,22 @@ bool JOIN::setup_subquery_caches()
|
|||
}
|
||||
for (ORDER *tmp_group= group_list; tmp_group ; tmp_group= tmp_group->next)
|
||||
{
|
||||
*tmp_group->item=
|
||||
(*tmp_group->item)->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
if (!(*tmp_group->item=
|
||||
(*tmp_group->item)->transform(thd,
|
||||
&Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
}
|
||||
if (select_lex->expr_cache_may_be_used[NO_MATTER])
|
||||
{
|
||||
for (ORDER *ord= order; ord; ord= ord->next)
|
||||
{
|
||||
*ord->item=
|
||||
(*ord->item)->transform(thd, &Item::expr_cache_insert_transformer,
|
||||
NULL);
|
||||
if (!(*ord->item=
|
||||
(*ord->item)->transform(thd,
|
||||
&Item::expr_cache_insert_transformer,
|
||||
NULL)))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(FALSE);
|
||||
|
|
@ -3635,7 +3664,8 @@ JOIN::reinit()
|
|||
}
|
||||
|
||||
if (!(select_options & SELECT_DESCRIBE))
|
||||
init_ftfuncs(thd, select_lex, MY_TEST(order));
|
||||
if (init_ftfuncs(thd, select_lex, MY_TEST(order)))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
|
@ -3677,7 +3707,14 @@ err:
|
|||
}
|
||||
|
||||
|
||||
void JOIN::save_explain_data(Explain_query *output, bool can_overwrite,
|
||||
/**
|
||||
@retval
|
||||
0 ok
|
||||
1 error
|
||||
*/
|
||||
|
||||
|
||||
bool JOIN::save_explain_data(Explain_query *output, bool can_overwrite,
|
||||
bool need_tmp_table, bool need_order,
|
||||
bool distinct)
|
||||
{
|
||||
|
|
@ -3696,9 +3733,8 @@ void JOIN::save_explain_data(Explain_query *output, bool can_overwrite,
|
|||
/* It's a degenerate join */
|
||||
message= zero_result_cause ? zero_result_cause : "No tables used";
|
||||
}
|
||||
save_explain_data_intern(thd->lex->explain, need_tmp_table, need_order,
|
||||
distinct, message);
|
||||
return;
|
||||
return save_explain_data_intern(thd->lex->explain, need_tmp_table, need_order,
|
||||
distinct, message);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3718,11 +3754,13 @@ void JOIN::save_explain_data(Explain_query *output, bool can_overwrite,
|
|||
{
|
||||
if (join_tab[i].filesort)
|
||||
{
|
||||
join_tab[i].filesort->tracker=
|
||||
new Filesort_tracker(thd->lex->analyze_stmt);
|
||||
if (!(join_tab[i].filesort->tracker=
|
||||
new Filesort_tracker(thd->lex->analyze_stmt)))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -9415,16 +9453,16 @@ Item *JOIN_TAB::get_splitting_cond_for_grouping_derived(THD *thd)
|
|||
for (ORDER *ord= sel->join->partition_list; ord;
|
||||
ord= ord->next, fld= li++)
|
||||
{
|
||||
Item *left_item= (*ord->item)->build_clone(thd, thd->mem_root);
|
||||
Item *left_item= (*ord->item)->build_clone(thd);
|
||||
uint i= 0;
|
||||
for (KEY_PART_INFO *key_part= start; key_part < end; key_part++, i++)
|
||||
{
|
||||
if (key_part->fieldnr == fld->field_index + 1)
|
||||
break;
|
||||
}
|
||||
Item *right_item= ref.items[i]->build_clone(thd, thd->mem_root);
|
||||
Item *right_item= ref.items[i]->build_clone(thd);
|
||||
Item_func_eq *eq_item= 0;
|
||||
right_item= right_item->build_clone(thd, thd->mem_root);
|
||||
right_item= right_item->build_clone(thd);
|
||||
if (left_item && right_item)
|
||||
{
|
||||
right_item->walk(&Item::set_fields_as_dependent_processor,
|
||||
|
|
@ -12610,7 +12648,8 @@ bool JOIN_TAB::preread_init()
|
|||
|
||||
/* init ftfuns for just initialized derived table */
|
||||
if (table->fulltext_searched)
|
||||
init_ftfuncs(join->thd, join->select_lex, MY_TEST(join->order));
|
||||
if (init_ftfuncs(join->thd, join->select_lex, MY_TEST(join->order)))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -14791,7 +14830,7 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
|
|||
This works OK with PS/SP re-execution as changes are made to
|
||||
the arguments of AND/OR items only
|
||||
*/
|
||||
if (new_item != item)
|
||||
if (new_item && new_item != item)
|
||||
li.replace(new_item);
|
||||
}
|
||||
|
||||
|
|
@ -14870,7 +14909,9 @@ static COND* substitute_for_best_equal_field(THD *thd, JOIN_TAB *context_tab,
|
|||
while((item_equal= it++))
|
||||
{
|
||||
REPLACE_EQUAL_FIELD_ARG arg= {item_equal, context_tab};
|
||||
cond= cond->transform(thd, &Item::replace_equal_field, (uchar *) &arg);
|
||||
if (!(cond= cond->transform(thd, &Item::replace_equal_field,
|
||||
(uchar *) &arg)))
|
||||
return 0;
|
||||
}
|
||||
cond_equal= cond_equal->upper_levels;
|
||||
}
|
||||
|
|
@ -15027,6 +15068,7 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
|
|||
{
|
||||
cond->marker=1;
|
||||
COND_CMP *tmp2;
|
||||
/* Will work, even if malloc would fail */
|
||||
if ((tmp2= new (thd->mem_root) COND_CMP(and_father, func)))
|
||||
save_list->push_back(tmp2);
|
||||
}
|
||||
|
|
@ -15059,6 +15101,7 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
|
|||
thd->change_item_tree(args + 1, value);
|
||||
cond->marker=1;
|
||||
COND_CMP *tmp2;
|
||||
/* Will work, even if malloc would fail */
|
||||
if ((tmp2=new (thd->mem_root) COND_CMP(and_father, func)))
|
||||
save_list->push_back(tmp2);
|
||||
}
|
||||
|
|
@ -16490,6 +16533,7 @@ Item_func_isnull::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
|
|||
query_cache_abort(thd, &thd->query_cache_tls);
|
||||
#endif
|
||||
COND *new_cond, *cond= this;
|
||||
/* If this fails, we will catch it later before executing query */
|
||||
if ((new_cond= new (thd->mem_root) Item_func_eq(thd, args[0],
|
||||
new (thd->mem_root) Item_int(thd, "last_insert_id()",
|
||||
thd->read_first_successful_insert_id_in_prev_stmt(),
|
||||
|
|
@ -17334,7 +17378,8 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
|||
Item *arg= sum_item->get_arg(i);
|
||||
if (!arg->const_item())
|
||||
{
|
||||
Field *new_field=
|
||||
Item *tmp_item;
|
||||
Field *new_field=
|
||||
create_tmp_field(thd, table, arg, arg->type(), ©_func,
|
||||
tmp_from_field, &default_field[fieldnr],
|
||||
group != 0,not_all_columns,
|
||||
|
|
@ -17359,7 +17404,10 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
|||
string_total_length+= new_field->pack_length();
|
||||
}
|
||||
thd->mem_root= mem_root_save;
|
||||
arg= sum_item->set_arg(i, thd, new (thd->mem_root) Item_temptable_field(thd, new_field));
|
||||
if (!(tmp_item= new (thd->mem_root)
|
||||
Item_temptable_field(thd, new_field)))
|
||||
goto err;
|
||||
arg= sum_item->set_arg(i, thd, tmp_item);
|
||||
thd->mem_root= &table->mem_root;
|
||||
if (param->force_not_null_cols)
|
||||
{
|
||||
|
|
@ -23275,6 +23323,10 @@ setup_new_fields(THD *thd, List<Item> &fields,
|
|||
|
||||
Try to use the fields in the order given by 'order' to allow one to
|
||||
optimize away 'order by'.
|
||||
|
||||
@retval
|
||||
0 OOM error if thd->is_fatal_error is set. Otherwise group was eliminated
|
||||
# Pointer to new group
|
||||
*/
|
||||
|
||||
ORDER *
|
||||
|
|
@ -23337,6 +23389,8 @@ create_distinct_group(THD *thd, Ref_ptr_array ref_pointer_array,
|
|||
BIT type and will be returned [el]client.
|
||||
*/
|
||||
Item_field *new_item= new (thd->mem_root) Item_field(thd, (Item_field*)item);
|
||||
if (!new_item)
|
||||
return 0;
|
||||
int el= all_fields.elements;
|
||||
orig_ref_pointer_array[el]= new_item;
|
||||
all_fields.push_front(new_item, thd->mem_root);
|
||||
|
|
@ -24018,7 +24072,10 @@ change_to_use_tmp_fields(THD *thd, Ref_ptr_array ref_pointer_array,
|
|||
if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM)
|
||||
item_field= item;
|
||||
else if (item->type() == Item::FIELD_ITEM)
|
||||
item_field= item->get_tmp_table_item(thd);
|
||||
{
|
||||
if (!(item_field= item->get_tmp_table_item(thd)))
|
||||
DBUG_RETURN(true);
|
||||
}
|
||||
else if (item->type() == Item::FUNC_ITEM &&
|
||||
((Item_func*)item)->functype() == Item_func::SUSERVAR_FUNC)
|
||||
{
|
||||
|
|
@ -24126,8 +24183,13 @@ change_refs_to_tmp_fields(THD *thd, Ref_ptr_array ref_pointer_array,
|
|||
if (item->type() == Item::SUM_FUNC_ITEM && item->const_item())
|
||||
new_item= item;
|
||||
else
|
||||
new_item= item->get_tmp_table_item(thd);
|
||||
res_all_fields.push_back(new_item, thd->mem_root);
|
||||
{
|
||||
if (!(new_item= item->get_tmp_table_item(thd)))
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (res_all_fields.push_back(new_item, thd->mem_root))
|
||||
return 1;
|
||||
ref_pointer_array[((i < border)? all_fields.elements-i-1 : i-border)]=
|
||||
new_item;
|
||||
}
|
||||
|
|
@ -24493,7 +24555,9 @@ bool JOIN::rollup_init()
|
|||
*/
|
||||
for (i= 0 ; i < send_group_parts ; i++)
|
||||
{
|
||||
rollup.null_items[i]= new (thd->mem_root) Item_null_result(thd);
|
||||
if (!(rollup.null_items[i]= new (thd->mem_root) Item_null_result(thd)))
|
||||
return true;
|
||||
|
||||
List<Item> *rollup_fields= &rollup.fields[i];
|
||||
rollup_fields->empty();
|
||||
rollup.ref_pointer_arrays[i]= Ref_ptr_array(ref_array, all_fields.elements);
|
||||
|
|
@ -24837,8 +24901,12 @@ void JOIN::clear()
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
Print an EXPLAIN line with all NULLs and given message in the 'Extra' column
|
||||
|
||||
@retval
|
||||
0 ok
|
||||
1 OOM error or error from send_data()
|
||||
*/
|
||||
|
||||
int print_explain_message_line(select_result_sink *result,
|
||||
|
|
@ -24897,7 +24965,7 @@ int print_explain_message_line(select_result_sink *result,
|
|||
else
|
||||
item_list.push_back(item_null, mem_root);
|
||||
|
||||
if (result->send_data(item_list))
|
||||
if (thd->is_fatal_error || result->send_data(item_list))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -24931,13 +24999,14 @@ int append_possible_keys(MEM_ROOT *alloc, String_list &list, TABLE *table,
|
|||
for (j=0 ; j < table->s->keys ; j++)
|
||||
{
|
||||
if (possible_keys.is_set(j))
|
||||
list.append_str(alloc, table->key_info[j].name.str);
|
||||
if (!(list.append_str(alloc, table->key_info[j].name.str)))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
||||
bool JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
||||
table_map prefix_tables,
|
||||
bool distinct_arg, JOIN_TAB *first_top_tab)
|
||||
{
|
||||
|
|
@ -24966,9 +25035,11 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
|||
|
||||
if (filesort)
|
||||
{
|
||||
eta->pre_join_sort= new Explain_aggr_filesort(thd->mem_root,
|
||||
thd->lex->analyze_stmt,
|
||||
filesort);
|
||||
if (!(eta->pre_join_sort=
|
||||
new Explain_aggr_filesort(thd->mem_root,
|
||||
thd->lex->analyze_stmt,
|
||||
filesort)))
|
||||
return 1;
|
||||
}
|
||||
|
||||
tracker= &eta->tracker;
|
||||
|
|
@ -25065,7 +25136,8 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
|||
// psergey-todo: why does this use thd MEM_ROOT??? Doesn't this
|
||||
// break ANALYZE ? thd->mem_root will be freed, and after that we will
|
||||
// attempt to print the query plan?
|
||||
append_possible_keys(thd->mem_root, eta->possible_keys, table, keys);
|
||||
if (append_possible_keys(thd->mem_root, eta->possible_keys, table, keys))
|
||||
return 1;
|
||||
// psergey-todo: ^ check for error return code
|
||||
|
||||
/* Build "key", "key_len", and "ref" */
|
||||
|
|
@ -25086,7 +25158,8 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
|||
*/
|
||||
if (tab_select && tab_select->quick && tab_type != JT_CONST)
|
||||
{
|
||||
eta->quick_info= tab_select->quick->get_explain(thd->mem_root);
|
||||
if (!(eta->quick_info= tab_select->quick->get_explain(thd->mem_root)))
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (key_info) /* 'index' or 'ref' access */
|
||||
|
|
@ -25099,10 +25172,14 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
|||
for (uint kp= 0; kp < ref.key_parts; kp++)
|
||||
{
|
||||
if ((key_part_map(1) << kp) & ref.const_ref_part_map)
|
||||
eta->ref_list.append_str(thd->mem_root, "const");
|
||||
{
|
||||
if (!(eta->ref_list.append_str(thd->mem_root, "const")))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
eta->ref_list.append_str(thd->mem_root, (*key_ref)->name());
|
||||
if (!(eta->ref_list.append_str(thd->mem_root, (*key_ref)->name())))
|
||||
return 1;
|
||||
key_ref++;
|
||||
}
|
||||
}
|
||||
|
|
@ -25359,7 +25436,8 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
|||
if (cache)
|
||||
{
|
||||
eta->push_extra(ET_USING_JOIN_BUFFER);
|
||||
cache->save_explain_data(&eta->bka_type);
|
||||
if (cache->save_explain_data(&eta->bka_type))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -25372,15 +25450,21 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta,
|
|||
|
||||
/* The same for non-merged semi-joins */
|
||||
eta->non_merged_sjm_number = get_non_merged_semijoin_select();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Walk through join->aggr_tables and save aggregation/grouping query plan into
|
||||
an Explain_select object
|
||||
|
||||
@retval
|
||||
0 ok
|
||||
1 error
|
||||
*/
|
||||
|
||||
void save_agg_explain_data(JOIN *join, Explain_select *xpl_sel)
|
||||
bool save_agg_explain_data(JOIN *join, Explain_select *xpl_sel)
|
||||
{
|
||||
JOIN_TAB *join_tab=join->join_tab + join->exec_join_tab_cnt();
|
||||
Explain_aggr_node *prev_node;
|
||||
|
|
@ -25392,7 +25476,8 @@ void save_agg_explain_data(JOIN *join, Explain_select *xpl_sel)
|
|||
{
|
||||
// Each aggregate means a temp.table
|
||||
prev_node= node;
|
||||
node= new Explain_aggr_tmp_table;
|
||||
if (!(node= new Explain_aggr_tmp_table))
|
||||
return 1;
|
||||
node->child= prev_node;
|
||||
|
||||
if (join_tab->window_funcs_step)
|
||||
|
|
@ -25400,19 +25485,20 @@ void save_agg_explain_data(JOIN *join, Explain_select *xpl_sel)
|
|||
Explain_aggr_node *new_node=
|
||||
join_tab->window_funcs_step->save_explain_plan(thd->mem_root,
|
||||
is_analyze);
|
||||
if (new_node)
|
||||
{
|
||||
prev_node=node;
|
||||
node= new_node;
|
||||
node->child= prev_node;
|
||||
}
|
||||
if (!new_node)
|
||||
return 1;
|
||||
|
||||
prev_node=node;
|
||||
node= new_node;
|
||||
node->child= prev_node;
|
||||
}
|
||||
|
||||
/* The below matches execution in join_init_read_record() */
|
||||
if (join_tab->distinct)
|
||||
{
|
||||
prev_node= node;
|
||||
node= new Explain_aggr_remove_dups;
|
||||
if (!(node= new Explain_aggr_remove_dups))
|
||||
return 1;
|
||||
node->child= prev_node;
|
||||
}
|
||||
|
||||
|
|
@ -25420,20 +25506,27 @@ void save_agg_explain_data(JOIN *join, Explain_select *xpl_sel)
|
|||
{
|
||||
Explain_aggr_filesort *eaf =
|
||||
new Explain_aggr_filesort(thd->mem_root, is_analyze, join_tab->filesort);
|
||||
if (!eaf)
|
||||
return 1;
|
||||
prev_node= node;
|
||||
node= eaf;
|
||||
node->child= prev_node;
|
||||
}
|
||||
}
|
||||
xpl_sel->aggr_tree= node;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
Save Query Plan Footprint
|
||||
|
||||
@note
|
||||
Currently, this function may be called multiple times
|
||||
|
||||
@retval
|
||||
0 ok
|
||||
1 error
|
||||
*/
|
||||
|
||||
int JOIN::save_explain_data_intern(Explain_query *output,
|
||||
|
|
@ -25442,7 +25535,6 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
const char *message)
|
||||
{
|
||||
JOIN *join= this; /* Legacy: this code used to be a non-member function */
|
||||
int cur_error= 0;
|
||||
DBUG_ENTER("JOIN::save_explain_data_intern");
|
||||
DBUG_PRINT("info", ("Select %p, type %s, message %s",
|
||||
join->select_lex, join->select_lex->type,
|
||||
|
|
@ -25460,8 +25552,11 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
|
||||
if (message)
|
||||
{
|
||||
explain= new (output->mem_root) Explain_select(output->mem_root,
|
||||
thd->lex->analyze_stmt);
|
||||
if (!(explain= new (output->mem_root)
|
||||
Explain_select(output->mem_root,
|
||||
thd->lex->analyze_stmt)))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
join->select_lex->set_explain_type(true);
|
||||
|
||||
explain->select_id= join->select_lex->select_number;
|
||||
|
|
@ -25474,13 +25569,17 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
|
||||
if (select_lex->master_unit()->derived)
|
||||
explain->connection_type= Explain_node::EXPLAIN_NODE_DERIVED;
|
||||
save_agg_explain_data(this, explain);
|
||||
if (save_agg_explain_data(this, explain))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
output->add_node(explain);
|
||||
}
|
||||
else if (pushdown_query)
|
||||
{
|
||||
explain= new (output->mem_root) Explain_select(output->mem_root,
|
||||
thd->lex->analyze_stmt);
|
||||
if (!(explain= new (output->mem_root)
|
||||
Explain_select(output->mem_root,
|
||||
thd->lex->analyze_stmt)))
|
||||
DBUG_RETURN(1);
|
||||
select_lex->set_explain_type(true);
|
||||
|
||||
explain->select_id= select_lex->select_number;
|
||||
|
|
@ -25500,6 +25599,9 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
explain= xpl_sel=
|
||||
new (output->mem_root) Explain_select(output->mem_root,
|
||||
thd->lex->analyze_stmt);
|
||||
if (!explain)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
table_map used_tables=0;
|
||||
|
||||
join->select_lex->set_explain_type(true);
|
||||
|
|
@ -25509,7 +25611,8 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
if (select_lex->master_unit()->derived)
|
||||
xpl_sel->connection_type= Explain_node::EXPLAIN_NODE_DERIVED;
|
||||
|
||||
save_agg_explain_data(this, xpl_sel);
|
||||
if (save_agg_explain_data(this, xpl_sel))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
xpl_sel->exec_const_cond= exec_const_cond;
|
||||
xpl_sel->outer_ref_cond= outer_ref_cond;
|
||||
|
|
@ -25541,6 +25644,8 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
Explain_table_access *eta= (new (output->mem_root)
|
||||
Explain_table_access(output->mem_root));
|
||||
|
||||
if (!eta)
|
||||
DBUG_RETURN(1);
|
||||
if (tab->bush_root_tab != prev_bush_root_tab)
|
||||
{
|
||||
if (tab->bush_root_tab)
|
||||
|
|
@ -25548,7 +25653,9 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
/*
|
||||
We've entered an SJ-Materialization nest. Create an object for it.
|
||||
*/
|
||||
cur_parent= new (output->mem_root) Explain_basic_join(output->mem_root);
|
||||
if (!(cur_parent=
|
||||
new (output->mem_root) Explain_basic_join(output->mem_root)))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
JOIN_TAB *first_child= tab->bush_root_tab->bush_children->start;
|
||||
cur_parent->select_id=
|
||||
|
|
@ -25568,7 +25675,8 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
prev_bush_root_tab= tab->bush_root_tab;
|
||||
|
||||
cur_parent->add_table(eta, output);
|
||||
tab->save_explain_data(eta, used_tables, distinct_arg, first_top_tab);
|
||||
if (tab->save_explain_data(eta, used_tables, distinct_arg, first_top_tab))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (saved_join_tab)
|
||||
tab= saved_join_tab;
|
||||
|
|
@ -25600,10 +25708,10 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||
}
|
||||
}
|
||||
|
||||
if (!cur_error && select_lex->is_top_level_node())
|
||||
if (select_lex->is_top_level_node())
|
||||
output->query_plan_ready();
|
||||
|
||||
DBUG_RETURN(cur_error);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ typedef struct st_join_table {
|
|||
|
||||
void remove_redundant_bnl_scan_conds();
|
||||
|
||||
void save_explain_data(Explain_table_access *eta, table_map prefix_tables,
|
||||
bool save_explain_data(Explain_table_access *eta, table_map prefix_tables,
|
||||
bool distinct, struct st_join_table *first_top_tab);
|
||||
|
||||
bool use_order() const; ///< Use ordering provided by chosen index?
|
||||
|
|
@ -1526,7 +1526,7 @@ public:
|
|||
int optimize();
|
||||
int optimize_inner();
|
||||
int optimize_stage2();
|
||||
void build_explain();
|
||||
bool build_explain();
|
||||
int reinit();
|
||||
int init_execution();
|
||||
void exec();
|
||||
|
|
@ -1667,7 +1667,7 @@ public:
|
|||
{
|
||||
return (unit->item && unit->item->is_in_predicate());
|
||||
}
|
||||
void save_explain_data(Explain_query *output, bool can_overwrite,
|
||||
bool save_explain_data(Explain_query *output, bool can_overwrite,
|
||||
bool need_tmp_table, bool need_order, bool distinct);
|
||||
int save_explain_data_intern(Explain_query *output, bool need_tmp_table,
|
||||
bool need_order, bool distinct,
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ public:
|
|||
}
|
||||
static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
|
||||
{ return (void*) alloc_root(mem_root, (uint) size); }
|
||||
static void *operator new[](size_t size, MEM_ROOT *mem_root) throw ()
|
||||
{ return alloc_root(mem_root, size); }
|
||||
static void operator delete(void *ptr_arg, size_t size)
|
||||
{
|
||||
(void) ptr_arg;
|
||||
|
|
@ -189,6 +191,10 @@ public:
|
|||
}
|
||||
static void operator delete(void *, MEM_ROOT *)
|
||||
{ /* never called */ }
|
||||
static void operator delete[](void *ptr, size_t size) { TRASH(ptr, size); }
|
||||
static void operator delete[](void *ptr, MEM_ROOT *mem_root)
|
||||
{ /* never called */ }
|
||||
|
||||
~String() { free(); }
|
||||
|
||||
/* Mark variable thread specific it it's not allocated already */
|
||||
|
|
|
|||
|
|
@ -441,6 +441,13 @@ uint check_n_cut_mysql50_prefix(const char *from, char *to, uint to_length)
|
|||
}
|
||||
|
||||
|
||||
static bool check_if_frm_exists(char *path, const char *db, const char *table)
|
||||
{
|
||||
fn_format(path, table, db, reg_ext, MYF(0));
|
||||
return !access(path, F_OK);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Translate a table name to a file name (WL #1324).
|
||||
|
||||
|
|
@ -531,13 +538,18 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db,
|
|||
DBUG_PRINT("enter", ("db: '%s' table_name: '%s' ext: '%s' flags: %x",
|
||||
db, table_name, ext, flags));
|
||||
|
||||
(void) tablename_to_filename(db, dbbuff, sizeof(dbbuff));
|
||||
|
||||
/* Check if this is a temporary table name. Allow it if a corresponding .frm file exists */
|
||||
if (is_prefix(table_name, tmp_file_prefix) && strlen(table_name) < NAME_CHAR_LEN &&
|
||||
check_if_frm_exists(tbbuff, dbbuff, table_name))
|
||||
flags|= FN_IS_TMP;
|
||||
|
||||
if (flags & FN_IS_TMP) // FN_FROM_IS_TMP | FN_TO_IS_TMP
|
||||
strmake(tbbuff, table_name, sizeof(tbbuff)-1);
|
||||
else
|
||||
(void) tablename_to_filename(table_name, tbbuff, sizeof(tbbuff));
|
||||
|
||||
(void) tablename_to_filename(db, dbbuff, sizeof(dbbuff));
|
||||
|
||||
char *end = buff + bufflen;
|
||||
/* Don't add FN_ROOTDIR if mysql_data_home already includes it */
|
||||
char *pos = strnmov(buff, mysql_data_home, bufflen);
|
||||
|
|
@ -9964,7 +9976,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
|||
if (mysql_trans_prepare_alter_copy_data(thd))
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
if (!(copy= new Copy_field[to->s->fields]))
|
||||
if (!(copy= new (thd->mem_root) Copy_field[to->s->fields]))
|
||||
DBUG_RETURN(-1); /* purecov: inspected */
|
||||
|
||||
/* We need external lock before we can disable/enable keys */
|
||||
|
|
|
|||
|
|
@ -283,6 +283,9 @@ int table_value_constr::save_explain_data_intern(THD *thd,
|
|||
|
||||
explain= new (output->mem_root) Explain_select(output->mem_root,
|
||||
thd->lex->analyze_stmt);
|
||||
if (!explain)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
select_lex->set_explain_type(true);
|
||||
|
||||
explain->select_id= select_lex->select_number;
|
||||
|
|
@ -309,7 +312,7 @@ int table_value_constr::save_explain_data_intern(THD *thd,
|
|||
Optimization of TVC
|
||||
*/
|
||||
|
||||
void table_value_constr::optimize(THD *thd)
|
||||
bool table_value_constr::optimize(THD *thd)
|
||||
{
|
||||
create_explain_query_if_not_exists(thd->lex, thd->mem_root);
|
||||
have_query_plan= QEP_AVAILABLE;
|
||||
|
|
@ -320,8 +323,9 @@ void table_value_constr::optimize(THD *thd)
|
|||
thd->lex->explain && // for "SET" command in SPs.
|
||||
(!thd->lex->explain->get_select(select_lex->select_number)))
|
||||
{
|
||||
save_explain_data_intern(thd, thd->lex->explain);
|
||||
return save_explain_data_intern(thd, thd->lex->explain);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@
|
|||
#ifndef SQL_TVC_INCLUDED
|
||||
#define SQL_TVC_INCLUDED
|
||||
#include "sql_type.h"
|
||||
#include "item.h"
|
||||
|
||||
typedef List<Item> List_item;
|
||||
class select_result;
|
||||
|
||||
class Explain_select;
|
||||
class Explain_query;
|
||||
class Item_func_in;
|
||||
class st_select_lex_unit;
|
||||
typedef class st_select_lex SELECT_LEX;
|
||||
|
||||
/**
|
||||
@class table_value_constr
|
||||
|
|
@ -57,7 +57,7 @@ public:
|
|||
|
||||
int save_explain_data_intern(THD *thd_arg,
|
||||
Explain_query *output);
|
||||
void optimize(THD *thd_arg);
|
||||
bool optimize(THD *thd_arg);
|
||||
bool exec(SELECT_LEX *sl);
|
||||
|
||||
void print(THD *thd_arg, String *str, enum_query_type query_type);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ struct Schema_specification_st;
|
|||
struct TABLE;
|
||||
struct SORT_FIELD_ATTR;
|
||||
|
||||
|
||||
/*
|
||||
Flags for collation aggregation modes, used in TDCollation::agg():
|
||||
|
||||
|
|
|
|||
|
|
@ -1282,7 +1282,11 @@ bool st_select_lex_unit::optimize()
|
|||
sl->tvc->select_options=
|
||||
(select_limit_cnt == HA_POS_ERROR || sl->braces) ?
|
||||
sl->options & ~OPTION_FOUND_ROWS : sl->options | found_rows_for_union;
|
||||
sl->tvc->optimize(thd);
|
||||
if (sl->tvc->optimize(thd))
|
||||
{
|
||||
thd->lex->current_select= lex_select_save;
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
thd->lex->current_select= sl;
|
||||
|
|
@ -1397,7 +1401,7 @@ bool st_select_lex_unit::exec()
|
|||
sl->tvc->select_options=
|
||||
(select_limit_cnt == HA_POS_ERROR || sl->braces) ?
|
||||
sl->options & ~OPTION_FOUND_ROWS : sl->options | found_rows_for_union;
|
||||
sl->tvc->optimize(thd);
|
||||
saved_error= sl->tvc->optimize(thd);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -474,7 +474,8 @@ int mysql_update(THD *thd,
|
|||
goto err;
|
||||
}
|
||||
}
|
||||
init_ftfuncs(thd, select_lex, 1);
|
||||
if (init_ftfuncs(thd, select_lex, 1))
|
||||
goto err;
|
||||
|
||||
table->mark_columns_needed_for_update();
|
||||
|
||||
|
|
@ -545,7 +546,8 @@ int mysql_update(THD *thd,
|
|||
*/
|
||||
if (thd->lex->describe)
|
||||
goto produce_explain_and_leave;
|
||||
explain= query_plan.save_explain_update_data(query_plan.mem_root, thd);
|
||||
if (!(explain= query_plan.save_explain_update_data(query_plan.mem_root, thd)))
|
||||
goto err;
|
||||
|
||||
ANALYZE_START_TRACKING(&explain->command_tracker);
|
||||
|
||||
|
|
@ -1103,7 +1105,8 @@ produce_explain_and_leave:
|
|||
We come here for various "degenerate" query plans: impossible WHERE,
|
||||
no-partitions-used, impossible-range, etc.
|
||||
*/
|
||||
query_plan.save_explain_update_data(query_plan.mem_root, thd);
|
||||
if (!query_plan.save_explain_update_data(query_plan.mem_root, thd))
|
||||
goto err;
|
||||
|
||||
emit_explain_and_leave:
|
||||
int err2= thd->lex->explain->send_explain(thd);
|
||||
|
|
@ -1836,7 +1839,7 @@ int multi_update::prepare(List<Item> ¬_used_values,
|
|||
switch_to_nullable_trigger_fields(*values_for_table[i], table);
|
||||
}
|
||||
}
|
||||
copy_field= new Copy_field[max_fields];
|
||||
copy_field= new (thd->mem_root) Copy_field[max_fields];
|
||||
DBUG_RETURN(thd->is_fatal_error != 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3093,10 +3093,14 @@ Window_funcs_computation::save_explain_plan(MEM_ROOT *mem_root,
|
|||
Explain_aggr_window_funcs *xpl= new Explain_aggr_window_funcs;
|
||||
List_iterator<Window_funcs_sort> it(win_func_sorts);
|
||||
Window_funcs_sort *srt;
|
||||
if (!xpl)
|
||||
return 0;
|
||||
while ((srt = it++))
|
||||
{
|
||||
Explain_aggr_filesort *eaf=
|
||||
new Explain_aggr_filesort(mem_root, is_analyze, srt->filesort);
|
||||
if (!eaf)
|
||||
return 0;
|
||||
xpl->sorts.push_back(eaf, mem_root);
|
||||
}
|
||||
return xpl;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#ifndef SQL_WINDOW_INCLUDED
|
||||
#define SQL_WINDOW_INCLUDED
|
||||
|
||||
#include "item.h"
|
||||
#include "filesort.h"
|
||||
#include "records.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -437,6 +437,13 @@ static Sys_var_ulonglong Sys_binlog_cache_size(
|
|||
CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(IO_SIZE, SIZE_T_MAX), DEFAULT(32768), BLOCK_SIZE(IO_SIZE));
|
||||
|
||||
static Sys_var_ulonglong Sys_binlog_file_cache_size(
|
||||
"binlog_file_cache_size",
|
||||
"The size of file cache for the binary log",
|
||||
GLOBAL_VAR(binlog_file_cache_size),
|
||||
CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(IO_SIZE*2, SIZE_T_MAX), DEFAULT(IO_SIZE*4), BLOCK_SIZE(IO_SIZE));
|
||||
|
||||
static Sys_var_ulonglong Sys_binlog_stmt_cache_size(
|
||||
"binlog_stmt_cache_size", "The size of the statement cache for "
|
||||
"updates to non-transactional engines for the binary log. "
|
||||
|
|
@ -5345,6 +5352,38 @@ static Sys_var_ulong Sys_host_cache_size(
|
|||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
|
||||
ON_UPDATE(fix_host_cache_size));
|
||||
|
||||
vio_keepalive_opts opt_vio_keepalive;
|
||||
|
||||
static Sys_var_int Sys_keepalive_time(
|
||||
"tcp_keepalive_time",
|
||||
"Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent."
|
||||
"If set to 0, system dependent default is used.",
|
||||
AUTO_SET GLOBAL_VAR(opt_vio_keepalive.idle),
|
||||
CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000),
|
||||
DEFAULT(0),
|
||||
BLOCK_SIZE(1),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL));
|
||||
|
||||
static Sys_var_int Sys_keepalive_interval(
|
||||
"tcp_keepalive_interval",
|
||||
"The interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received."
|
||||
"If set to 0, system dependent default is used.",
|
||||
AUTO_SET GLOBAL_VAR(opt_vio_keepalive.interval),
|
||||
CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000),
|
||||
DEFAULT(0),
|
||||
BLOCK_SIZE(1),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL));
|
||||
|
||||
static Sys_var_int Sys_keepalive_probes(
|
||||
"tcp_keepalive_probes",
|
||||
"The number of unacknowledged probes to send before considering the connection dead and notifying the application layer."
|
||||
"If set to 0, system dependent default is used.",
|
||||
AUTO_SET GLOBAL_VAR(opt_vio_keepalive.probes),
|
||||
CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000),
|
||||
DEFAULT(0),
|
||||
BLOCK_SIZE(1),
|
||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL));
|
||||
|
||||
static Sys_var_charptr Sys_ignore_db_dirs(
|
||||
"ignore_db_dirs",
|
||||
"Specifies a directory to add to the ignore list when collecting "
|
||||
|
|
|
|||
28
sql/table.cc
28
sql/table.cc
|
|
@ -219,31 +219,26 @@ static uchar *get_field_name(Field **buff, size_t *length,
|
|||
Returns pointer to '.frm' extension of the file name.
|
||||
|
||||
SYNOPSIS
|
||||
fn_rext()
|
||||
fn_frm_ext()
|
||||
name file name
|
||||
|
||||
DESCRIPTION
|
||||
Checks file name part starting with the rightmost '.' character,
|
||||
and returns it if it is equal to '.frm'.
|
||||
|
||||
TODO
|
||||
It is a good idea to get rid of this function modifying the code
|
||||
to garantee that the functions presently calling fn_rext() always
|
||||
get arguments in the same format: either with '.frm' or without '.frm'.
|
||||
|
||||
RETURN VALUES
|
||||
Pointer to the '.frm' extension. If there is no extension,
|
||||
or extension is not '.frm', pointer at the end of file name.
|
||||
Pointer to the '.frm' extension or NULL if not a .frm file
|
||||
*/
|
||||
|
||||
char *fn_rext(char *name)
|
||||
const char *fn_frm_ext(const char *name)
|
||||
{
|
||||
char *res= strrchr(name, '.');
|
||||
const char *res= strrchr(name, '.');
|
||||
if (res && !strcmp(res, reg_ext))
|
||||
return res;
|
||||
return name + strlen(name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
TABLE_CATEGORY get_table_category(const LEX_CSTRING *db,
|
||||
const LEX_CSTRING *name)
|
||||
{
|
||||
|
|
@ -6421,11 +6416,6 @@ void TABLE::mark_columns_needed_for_delete()
|
|||
need_signal= true;
|
||||
}
|
||||
}
|
||||
if (check_constraints)
|
||||
{
|
||||
mark_check_constraint_columns_for_read();
|
||||
need_signal= true;
|
||||
}
|
||||
|
||||
if (need_signal)
|
||||
file->column_bitmaps_signal();
|
||||
|
|
@ -8439,8 +8429,8 @@ Item* TABLE_LIST::build_pushable_cond_for_table(THD *thd, Item *cond)
|
|||
if (!(item->used_tables() == tab_map))
|
||||
continue;
|
||||
Item_func_eq *eq= 0;
|
||||
Item *left_item_clone= left_item->build_clone(thd, thd->mem_root);
|
||||
Item *right_item_clone= item->build_clone(thd, thd->mem_root);
|
||||
Item *left_item_clone= left_item->build_clone(thd);
|
||||
Item *right_item_clone= item->build_clone(thd);
|
||||
if (left_item_clone && right_item_clone)
|
||||
{
|
||||
left_item_clone->set_item_equal(NULL);
|
||||
|
|
@ -8470,7 +8460,7 @@ Item* TABLE_LIST::build_pushable_cond_for_table(THD *thd, Item *cond)
|
|||
return new_cond;
|
||||
}
|
||||
else if (cond->get_extraction_flag() != NO_EXTRACTION_FL)
|
||||
return cond->build_clone(thd, thd->mem_root);
|
||||
return cond->build_clone(thd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2884,7 +2884,7 @@ ulong get_form_pos(File file, uchar *head, TYPELIB *save_names);
|
|||
void append_unescaped(String *res, const char *pos, uint length);
|
||||
void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo,
|
||||
HA_CREATE_INFO *create_info, uint keys, KEY *key_info);
|
||||
char *fn_rext(char *name);
|
||||
const char *fn_frm_ext(const char *name);
|
||||
|
||||
/* Check that the integer is in the internal */
|
||||
static inline int set_zone(int nr,int min_zone,int max_zone)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
#define VTMD_INCLUDED
|
||||
|
||||
#include <mysqld_error.h>
|
||||
|
||||
#include "mariadb.h"
|
||||
#include "sql_priv.h"
|
||||
|
||||
#include "my_sys.h"
|
||||
#include "table.h"
|
||||
#include "unireg.h"
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ extern uchar *hp_search_next(HP_INFO *info, HP_KEYDEF *keyinfo,
|
|||
const uchar *key, HASH_INFO *pos);
|
||||
extern ulong hp_hashnr(HP_KEYDEF *keyinfo,const uchar *key);
|
||||
extern ulong hp_rec_hashnr(HP_KEYDEF *keyinfo,const uchar *rec);
|
||||
extern ulong hp_mask(ulong hashnr,ulong buffmax,ulong maxlength);
|
||||
extern void hp_movelink(HASH_INFO *pos,HASH_INFO *next_link,
|
||||
HASH_INFO *newlink);
|
||||
extern int hp_rec_key_cmp(HP_KEYDEF *keydef,const uchar *rec1,
|
||||
|
|
@ -111,3 +110,22 @@ void init_heap_psi_keys();
|
|||
#endif /* HAVE_PSI_INTERFACE */
|
||||
|
||||
C_MODE_END
|
||||
|
||||
/*
|
||||
Calculate position number for hash value.
|
||||
SYNOPSIS
|
||||
hp_mask()
|
||||
hashnr Hash value
|
||||
buffmax Value such that
|
||||
2^(n-1) < maxlength <= 2^n = buffmax
|
||||
maxlength
|
||||
|
||||
RETURN
|
||||
Array index, in [0..maxlength)
|
||||
*/
|
||||
|
||||
static inline ulong hp_mask(ulong hashnr, ulong buffmax, ulong maxlength)
|
||||
{
|
||||
if ((hashnr & (buffmax-1)) < maxlength) return (hashnr & (buffmax-1));
|
||||
return (hashnr & ((buffmax >> 1) -1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,18 +100,20 @@ uchar *hp_search(HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key,
|
|||
uint nextflag)
|
||||
{
|
||||
reg1 HASH_INFO *pos,*prev_ptr;
|
||||
int flag;
|
||||
uint old_nextflag;
|
||||
HP_SHARE *share=info->s;
|
||||
DBUG_ENTER("hp_search");
|
||||
old_nextflag=nextflag;
|
||||
flag=1;
|
||||
prev_ptr=0;
|
||||
|
||||
if (share->records)
|
||||
{
|
||||
pos=hp_find_hash(&keyinfo->block, hp_mask(hp_hashnr(keyinfo, key),
|
||||
share->blength, share->records));
|
||||
ulong search_pos=
|
||||
hp_mask(hp_hashnr(keyinfo, key), share->blength, share->records);
|
||||
pos=hp_find_hash(&keyinfo->block, search_pos);
|
||||
if (search_pos !=
|
||||
hp_mask(pos->hash_of_key, share->blength, share->records))
|
||||
goto not_found; /* Wrong link */
|
||||
do
|
||||
{
|
||||
if (!hp_key_cmp(keyinfo, pos->ptr_to_rec, key))
|
||||
|
|
@ -142,17 +144,11 @@ uchar *hp_search(HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
flag=0; /* Reset flag */
|
||||
if (hp_find_hash(&keyinfo->block,
|
||||
hp_mask(pos->hash_of_key,
|
||||
share->blength, share->records)) != pos)
|
||||
break; /* Wrong link */
|
||||
}
|
||||
}
|
||||
while ((pos=pos->next_key));
|
||||
}
|
||||
|
||||
not_found:
|
||||
my_errno=HA_ERR_KEY_NOT_FOUND;
|
||||
if (nextflag == 2 && ! info->current_ptr)
|
||||
{
|
||||
|
|
@ -194,26 +190,6 @@ uchar *hp_search_next(HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Calculate position number for hash value.
|
||||
SYNOPSIS
|
||||
hp_mask()
|
||||
hashnr Hash value
|
||||
buffmax Value such that
|
||||
2^(n-1) < maxlength <= 2^n = buffmax
|
||||
maxlength
|
||||
|
||||
RETURN
|
||||
Array index, in [0..maxlength)
|
||||
*/
|
||||
|
||||
ulong hp_mask(ulong hashnr, ulong buffmax, ulong maxlength)
|
||||
{
|
||||
if ((hashnr & (buffmax-1)) < maxlength) return (hashnr & (buffmax-1));
|
||||
return (hashnr & ((buffmax >> 1) -1));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Change
|
||||
next_link -> ... -> X -> pos
|
||||
|
|
|
|||
|
|
@ -50,6 +50,14 @@ static const char* innobase_system_databases[] = {
|
|||
NullS
|
||||
};
|
||||
|
||||
/** The start of the table basename suffix for partitioned tables */
|
||||
const char table_name_t::part_suffix[4]
|
||||
#ifdef _WIN32
|
||||
= "#p#";
|
||||
#else
|
||||
= "#P#";
|
||||
#endif
|
||||
|
||||
/** An interger randomly initialized at startup used to make a temporary
|
||||
table name as unuique as possible. */
|
||||
static ib_uint32_t dict_temp_file_num;
|
||||
|
|
|
|||
|
|
@ -279,11 +279,7 @@ is_partition(
|
|||
{
|
||||
/* We look for pattern #P# to see if the table is partitioned
|
||||
MariaDB table. */
|
||||
#ifdef _WIN32
|
||||
return strstr(file_name, "#p#");
|
||||
#else
|
||||
return strstr(file_name, "#P#");
|
||||
#endif /* _WIN32 */
|
||||
return strstr(file_name, table_name_t::part_suffix);
|
||||
}
|
||||
|
||||
/** Signal to shut down InnoDB (NULL if shutdown was signaled, or if
|
||||
|
|
@ -13446,7 +13442,7 @@ ha_innobase::delete_table(
|
|||
iter != parent_trx->mod_tables.end();
|
||||
++iter) {
|
||||
|
||||
dict_table_t* table_to_drop = *iter;
|
||||
dict_table_t* table_to_drop = iter->first;
|
||||
|
||||
if (strcmp(norm_name, table_to_drop->name.m_name) == 0) {
|
||||
parent_trx->mod_tables.erase(table_to_drop);
|
||||
|
|
|
|||
|
|
@ -473,8 +473,8 @@ static bool create_option_need_rebuild(
|
|||
const Alter_inplace_info* ha_alter_info,
|
||||
const TABLE* table)
|
||||
{
|
||||
DBUG_ASSERT((ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)
|
||||
== Alter_inplace_info::CHANGE_CREATE_OPTION);
|
||||
DBUG_ASSERT(ha_alter_info->handler_flags
|
||||
& Alter_inplace_info::CHANGE_CREATE_OPTION);
|
||||
|
||||
if (ha_alter_info->create_info->used_fields
|
||||
& (HA_CREATE_USED_ROW_FORMAT
|
||||
|
|
@ -4891,11 +4891,18 @@ new_clustered_failed:
|
|||
goto err_exit;
|
||||
}
|
||||
|
||||
const char* new_table_name
|
||||
= dict_mem_create_temporary_tablename(
|
||||
ctx->heap,
|
||||
ctx->new_table->name.m_name,
|
||||
ctx->new_table->id);
|
||||
size_t dblen = ctx->old_table->name.dblen() + 1;
|
||||
size_t tablen = altered_table->s->table_name.length;
|
||||
const char* part = ctx->old_table->name.part();
|
||||
size_t partlen = part ? strlen(part) : 0;
|
||||
char* new_table_name = static_cast<char*>(
|
||||
mem_heap_alloc(ctx->heap,
|
||||
dblen + tablen + partlen + 1));
|
||||
memcpy(new_table_name, ctx->old_table->name.m_name, dblen);
|
||||
memcpy(new_table_name + dblen,
|
||||
altered_table->s->table_name.str, tablen);
|
||||
memcpy(new_table_name + dblen + tablen,
|
||||
part ? part : "", partlen + 1);
|
||||
ulint n_cols = 0;
|
||||
ulint n_v_cols = 0;
|
||||
dtuple_t* add_cols;
|
||||
|
|
|
|||
|
|
@ -566,6 +566,29 @@ struct table_name_t
|
|||
{
|
||||
/** The name in internal representation */
|
||||
char* m_name;
|
||||
|
||||
/** @return the end of the schema name */
|
||||
const char* dbend() const
|
||||
{
|
||||
const char* sep = strchr(m_name, '/');
|
||||
ut_ad(sep);
|
||||
return sep;
|
||||
}
|
||||
|
||||
/** @return the length of the schema name, in bytes */
|
||||
size_t dblen() const { return dbend() - m_name; }
|
||||
|
||||
/** Determine the filename-safe encoded table name.
|
||||
@return the filename-safe encoded table name */
|
||||
const char* basename() const { return dbend() + 1; }
|
||||
|
||||
/** The start of the table basename suffix for partitioned tables */
|
||||
static const char part_suffix[4];
|
||||
|
||||
/** Determine the partition or subpartition name suffix.
|
||||
@return the partition name
|
||||
@retval NULL if the table is not partitioned */
|
||||
const char* part() const { return strstr(basename(), part_suffix); }
|
||||
};
|
||||
|
||||
/** Data structure for a column in a table */
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ struct recv_sys_t{
|
|||
ib_mutex_t writer_mutex;/*!< mutex coordinating
|
||||
flushing between recv_writer_thread and
|
||||
the recovery thread. */
|
||||
os_event_t flush_start;/*!< event to acticate
|
||||
os_event_t flush_start;/*!< event to activate
|
||||
page cleaner threads */
|
||||
os_event_t flush_end;/*!< event to signal that the page
|
||||
cleaner has finished the request */
|
||||
|
|
|
|||
|
|
@ -189,9 +189,7 @@ trx_undo_report_row_operation(
|
|||
index; NULL if insert */
|
||||
const ulint* offsets, /*!< in: rec_get_offsets(rec) */
|
||||
roll_ptr_t* roll_ptr) /*!< out: rollback pointer to the
|
||||
inserted undo log record,
|
||||
0 if BTR_NO_UNDO_LOG
|
||||
flag was specified */
|
||||
inserted undo log record */
|
||||
MY_ATTRIBUTE((nonnull(1,2,8), warn_unused_result));
|
||||
|
||||
/** status bit used for trx_undo_prev_version_build() */
|
||||
|
|
|
|||
|
|
@ -779,12 +779,13 @@ struct trx_lock_t {
|
|||
bool start_stmt;
|
||||
};
|
||||
|
||||
/** Type used to store the list of tables that are modified by a given
|
||||
transaction. We store pointers to the table objects in memory because
|
||||
/** Collection of persistent tables and their first modification
|
||||
in a transaction.
|
||||
We store pointers to the table objects in memory because
|
||||
we know that a table object will not be destroyed while a transaction
|
||||
that modified it is running. */
|
||||
typedef std::set<
|
||||
dict_table_t*,
|
||||
typedef std::map<
|
||||
dict_table_t*, undo_no_t,
|
||||
std::less<dict_table_t*>,
|
||||
ut_allocator<dict_table_t*> > trx_mod_tables_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,14 +47,11 @@ typedef uint32_t (*ut_crc32_func_t)(const byte* ptr, ulint len);
|
|||
/** Pointer to CRC32 calculation function. */
|
||||
extern ut_crc32_func_t ut_crc32;
|
||||
|
||||
/** Pointer to CRC32 calculation function, which uses big-endian byte order
|
||||
/** CRC32 calculation function, which uses big-endian byte order
|
||||
when converting byte strings to integers internally. */
|
||||
extern ut_crc32_func_t ut_crc32_legacy_big_endian;
|
||||
|
||||
/** Pointer to CRC32-byte-by-byte calculation function (byte order agnostic,
|
||||
but very slow). */
|
||||
extern ut_crc32_func_t ut_crc32_byte_by_byte;
|
||||
extern uint32_t ut_crc32_legacy_big_endian(const byte* buf, ulint len);
|
||||
|
||||
/** Text description of CRC32 implementation */
|
||||
extern const char* ut_crc32_implementation;
|
||||
|
||||
#endif /* ut0crc32_h */
|
||||
|
|
|
|||
|
|
@ -3933,8 +3933,8 @@ row_drop_table_for_mysql(
|
|||
TRX_DICT_OP_INDEX, we should be dropping auxiliary
|
||||
tables for full-text indexes or temp tables. */
|
||||
ut_ad(strstr(table->name.m_name, "/FTS_") != NULL
|
||||
|| strstr(table->name.m_name, TEMP_FILE_PREFIX_INNODB)
|
||||
!= NULL);
|
||||
|| strstr(table->name.m_name,
|
||||
TEMP_TABLE_PATH_PREFIX) != NULL);
|
||||
}
|
||||
|
||||
/* Mark all indexes unavailable in the data dictionary cache
|
||||
|
|
|
|||
|
|
@ -1893,9 +1893,7 @@ trx_undo_report_row_operation(
|
|||
index; NULL if insert */
|
||||
const ulint* offsets, /*!< in: rec_get_offsets(rec) */
|
||||
roll_ptr_t* roll_ptr) /*!< out: rollback pointer to the
|
||||
inserted undo log record,
|
||||
0 if BTR_NO_UNDO_LOG
|
||||
flag was specified */
|
||||
inserted undo log record */
|
||||
{
|
||||
trx_t* trx;
|
||||
ulint page_no;
|
||||
|
|
@ -1929,16 +1927,6 @@ trx_undo_report_row_operation(
|
|||
} else {
|
||||
ut_ad(!trx->read_only);
|
||||
ut_ad(trx->id);
|
||||
if (UNIV_LIKELY(!clust_entry || clust_entry->info_bits
|
||||
!= REC_INFO_DEFAULT_ROW)) {
|
||||
/* Keep INFORMATION_SCHEMA.TABLES.UPDATE_TIME
|
||||
up-to-date for persistent tables outside
|
||||
instant ADD COLUMN. */
|
||||
trx->mod_tables.insert(index->table);
|
||||
} else {
|
||||
ut_ad(index->is_instant());
|
||||
}
|
||||
|
||||
pundo = &trx->rsegs.m_redo.undo;
|
||||
rseg = trx->rsegs.m_redo.rseg;
|
||||
}
|
||||
|
|
@ -2024,6 +2012,13 @@ trx_undo_report_row_operation(
|
|||
|
||||
mutex_exit(&trx->undo_mutex);
|
||||
|
||||
if (!is_temp) {
|
||||
trx->mod_tables.insert(
|
||||
trx_mod_tables_t::value_type(
|
||||
index->table,
|
||||
undo->top_undo_no));
|
||||
}
|
||||
|
||||
*roll_ptr = trx_undo_build_roll_ptr(
|
||||
!rec, rseg->id, page_no, offset);
|
||||
return(DB_SUCCESS);
|
||||
|
|
|
|||
|
|
@ -126,6 +126,14 @@ trx_rollback_to_savepoint_low(
|
|||
trx_rollback_finish(trx);
|
||||
MONITOR_INC(MONITOR_TRX_ROLLBACK);
|
||||
} else {
|
||||
const undo_no_t limit = savept->least_undo_no;
|
||||
for (trx_mod_tables_t::iterator i = trx->mod_tables.begin();
|
||||
i != trx->mod_tables.end(); ) {
|
||||
trx_mod_tables_t::iterator j = i++;
|
||||
if (j->second >= limit) {
|
||||
trx->mod_tables.erase(j);
|
||||
}
|
||||
}
|
||||
trx->lock.que_state = TRX_QUE_RUNNING;
|
||||
MONITOR_INC(MONITOR_TRX_ROLLBACK_SAVEPOINT);
|
||||
trx->vers_update_trt = savept->vers_update_trt;
|
||||
|
|
@ -1156,10 +1164,8 @@ trx_rollback_finish(
|
|||
/*================*/
|
||||
trx_t* trx) /*!< in: transaction */
|
||||
{
|
||||
trx_commit(trx);
|
||||
|
||||
trx->mod_tables.clear();
|
||||
|
||||
trx_commit(trx);
|
||||
trx->lock.que_state = TRX_QUE_RUNNING;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -785,7 +785,9 @@ trx_resurrect_table_locks(
|
|||
}
|
||||
|
||||
if (trx->state == TRX_STATE_PREPARED) {
|
||||
trx->mod_tables.insert(table);
|
||||
trx->mod_tables.insert(
|
||||
trx_mod_tables_t::value_type(table,
|
||||
0));
|
||||
}
|
||||
lock_table_ix_resurrect(table, trx);
|
||||
|
||||
|
|
@ -1621,7 +1623,7 @@ trx_update_mod_tables_timestamp(
|
|||
"garbage" in table->update_time is justified because
|
||||
protecting it with a latch here would be too performance
|
||||
intrusive. */
|
||||
(*it)->update_time = now;
|
||||
it->first->update_time = now;
|
||||
}
|
||||
|
||||
trx->mod_tables.clear();
|
||||
|
|
@ -1727,8 +1729,12 @@ trx_commit_in_memory(
|
|||
trx->state = TRX_STATE_NOT_STARTED;
|
||||
|
||||
} else {
|
||||
const bool rw = trx->rsegs.m_redo.rseg != NULL;
|
||||
|
||||
if (trx->id > 0) {
|
||||
ut_ad(!trx->read_only || !rw);
|
||||
ut_ad(trx->id || !rw);
|
||||
|
||||
if (rw) {
|
||||
/* For consistent snapshot, we need to remove current
|
||||
transaction from running transaction id list for mvcc
|
||||
before doing commit and releasing locks. */
|
||||
|
|
@ -1743,16 +1749,14 @@ trx_commit_in_memory(
|
|||
ut_ad(trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY));
|
||||
DEBUG_SYNC_C("after_trx_committed_in_memory");
|
||||
|
||||
if (trx->read_only || trx->rsegs.m_redo.rseg == NULL) {
|
||||
|
||||
if (!rw) {
|
||||
MONITOR_INC(MONITOR_TRX_RO_COMMIT);
|
||||
if (trx->read_view != NULL) {
|
||||
trx_sys->mvcc->view_close(
|
||||
trx->read_view, false);
|
||||
}
|
||||
|
||||
} else {
|
||||
ut_ad(trx->id > 0);
|
||||
trx_update_mod_tables_timestamp(trx);
|
||||
MONITOR_INC(MONITOR_TRX_RW_COMMIT);
|
||||
}
|
||||
}
|
||||
|
|
@ -2207,10 +2211,6 @@ trx_commit_for_mysql(
|
|||
|
||||
trx->op_info = "committing";
|
||||
|
||||
if (trx->id != 0) {
|
||||
trx_update_mod_tables_timestamp(trx);
|
||||
}
|
||||
|
||||
trx_commit(trx);
|
||||
|
||||
MONITOR_DEC(MONITOR_TRX_ACTIVE);
|
||||
|
|
|
|||
|
|
@ -86,20 +86,6 @@ mysys/my_perf.c, contributed by Facebook under the following license.
|
|||
#include "univ.i"
|
||||
#include "ut0crc32.h"
|
||||
|
||||
/** Pointer to CRC32 calculation function. */
|
||||
ut_crc32_func_t ut_crc32;
|
||||
|
||||
/** Pointer to CRC32 calculation function, which uses big-endian byte order
|
||||
when converting byte strings to integers internally. */
|
||||
ut_crc32_func_t ut_crc32_legacy_big_endian;
|
||||
|
||||
/** Pointer to CRC32-byte-by-byte calculation function (byte order agnostic,
|
||||
but very slow). */
|
||||
ut_crc32_func_t ut_crc32_byte_by_byte;
|
||||
|
||||
/** Text description of CRC32 implementation */
|
||||
const char* ut_crc32_implementation;
|
||||
|
||||
/** Swap the byte order of an 8 byte integer.
|
||||
@param[in] i 8-byte integer
|
||||
@return 8-byte integer */
|
||||
|
|
@ -133,6 +119,13 @@ ut_crc32_power8(
|
|||
{
|
||||
return crc32c_vpmsum(0, buf, len);
|
||||
}
|
||||
|
||||
ut_crc32_func_t ut_crc32 = ut_crc32_power8;
|
||||
const char* ut_crc32_implementation = "Using POWER8 crc32 instructions";
|
||||
#else
|
||||
uint32_t ut_crc32_sw(const byte* buf, ulint len);
|
||||
ut_crc32_func_t ut_crc32 = ut_crc32_sw;
|
||||
const char* ut_crc32_implementation = "Using generic crc32 instructions";
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__x86_64__)
|
||||
|
|
@ -242,37 +235,6 @@ ut_crc32_64_hw(
|
|||
*len -= 8;
|
||||
}
|
||||
|
||||
/** Calculate CRC32 over 64-bit byte string using a hardware/CPU instruction.
|
||||
The byte string is converted to a 64-bit integer using big endian byte order.
|
||||
@param[in,out] crc crc32 checksum so far when this function is called,
|
||||
when the function ends it will contain the new checksum
|
||||
@param[in,out] data data to be checksummed, the pointer will be advanced
|
||||
with 8 bytes
|
||||
@param[in,out] len remaining bytes, it will be decremented with 8 */
|
||||
inline
|
||||
void
|
||||
ut_crc32_64_legacy_big_endian_hw(
|
||||
uint32_t* crc,
|
||||
const byte** data,
|
||||
ulint* len)
|
||||
{
|
||||
uint64_t data_int = *reinterpret_cast<const uint64_t*>(*data);
|
||||
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
data_int = ut_crc32_swap_byteorder(data_int);
|
||||
#else
|
||||
/* Currently we only support x86_64 (little endian) CPUs. In case
|
||||
some big endian CPU supports a CRC32 instruction, then maybe we will
|
||||
NOT need a byte order swap here. */
|
||||
#error Dont know how to handle big endian CPUs
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
|
||||
*crc = ut_crc32_64_low_hw(*crc, data_int);
|
||||
|
||||
*data += 8;
|
||||
*len -= 8;
|
||||
}
|
||||
|
||||
/** Calculates CRC32 using hardware/CPU instructions.
|
||||
@param[in] buf data over which to calculate CRC32
|
||||
@param[in] len data length
|
||||
|
|
@ -359,76 +321,6 @@ ut_crc32_hw(
|
|||
|
||||
return(~crc);
|
||||
}
|
||||
|
||||
/** Calculates CRC32 using hardware/CPU instructions.
|
||||
This function uses big endian byte ordering when converting byte sequence to
|
||||
integers.
|
||||
@param[in] buf data over which to calculate CRC32
|
||||
@param[in] len data length
|
||||
@return CRC-32C (polynomial 0x11EDC6F41) */
|
||||
uint32_t
|
||||
ut_crc32_legacy_big_endian_hw(
|
||||
const byte* buf,
|
||||
ulint len)
|
||||
{
|
||||
uint32_t crc = 0xFFFFFFFFU;
|
||||
|
||||
/* Calculate byte-by-byte up to an 8-byte aligned address. After
|
||||
this consume the input 8-bytes at a time. */
|
||||
while (len > 0 && (reinterpret_cast<uintptr_t>(buf) & 7) != 0) {
|
||||
ut_crc32_8_hw(&crc, &buf, &len);
|
||||
}
|
||||
|
||||
while (len >= 128) {
|
||||
/* This call is repeated 16 times. 16 * 8 = 128. */
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
}
|
||||
|
||||
while (len >= 8) {
|
||||
ut_crc32_64_legacy_big_endian_hw(&crc, &buf, &len);
|
||||
}
|
||||
|
||||
while (len > 0) {
|
||||
ut_crc32_8_hw(&crc, &buf, &len);
|
||||
}
|
||||
|
||||
return(~crc);
|
||||
}
|
||||
|
||||
/** Calculates CRC32 using hardware/CPU instructions.
|
||||
This function processes one byte at a time (very slow) and thus it does
|
||||
not depend on the byte order of the machine.
|
||||
@param[in] buf data over which to calculate CRC32
|
||||
@param[in] len data length
|
||||
@return CRC-32C (polynomial 0x11EDC6F41) */
|
||||
uint32_t
|
||||
ut_crc32_byte_by_byte_hw(
|
||||
const byte* buf,
|
||||
ulint len)
|
||||
{
|
||||
uint32_t crc = 0xFFFFFFFFU;
|
||||
|
||||
while (len > 0) {
|
||||
ut_crc32_8_hw(&crc, &buf, &len);
|
||||
}
|
||||
|
||||
return(~crc);
|
||||
}
|
||||
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
||||
|
||||
/* CRC32 software implementation. */
|
||||
|
|
@ -624,7 +516,7 @@ integers.
|
|||
@param[in] len data length
|
||||
@return CRC-32C (polynomial 0x11EDC6F41) */
|
||||
uint32_t
|
||||
ut_crc32_legacy_big_endian_sw(
|
||||
ut_crc32_legacy_big_endian(
|
||||
const byte* buf,
|
||||
ulint len)
|
||||
{
|
||||
|
|
@ -669,28 +561,6 @@ ut_crc32_legacy_big_endian_sw(
|
|||
return(~crc);
|
||||
}
|
||||
|
||||
/** Calculates CRC32 in software, without using CPU instructions.
|
||||
This function processes one byte at a time (very slow) and thus it does
|
||||
not depend on the byte order of the machine.
|
||||
@param[in] buf data over which to calculate CRC32
|
||||
@param[in] len data length
|
||||
@return CRC-32C (polynomial 0x11EDC6F41) */
|
||||
uint32_t
|
||||
ut_crc32_byte_by_byte_sw(
|
||||
const byte* buf,
|
||||
ulint len)
|
||||
{
|
||||
uint32_t crc = 0xFFFFFFFFU;
|
||||
|
||||
ut_a(ut_crc32_slice8_table_initialized);
|
||||
|
||||
while (len > 0) {
|
||||
ut_crc32_8_sw(&crc, &buf, &len);
|
||||
}
|
||||
|
||||
return(~crc);
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Initializes the data structures used by ut_crc32*(). Does not do any
|
||||
allocations, would not hurt if called twice, but would be pointless. */
|
||||
|
|
@ -699,10 +569,6 @@ ut_crc32_init()
|
|||
/*===========*/
|
||||
{
|
||||
ut_crc32_slice8_table_init();
|
||||
ut_crc32 = ut_crc32_sw;
|
||||
ut_crc32_legacy_big_endian = ut_crc32_legacy_big_endian_sw;
|
||||
ut_crc32_byte_by_byte = ut_crc32_byte_by_byte_sw;
|
||||
ut_crc32_implementation = "Using generic crc32 instructions";
|
||||
|
||||
#if defined(__GNUC__) && defined(__x86_64__)
|
||||
uint32_t vend[3];
|
||||
|
|
@ -734,14 +600,7 @@ ut_crc32_init()
|
|||
|
||||
if (features_ecx & 1 << 20) {
|
||||
ut_crc32 = ut_crc32_hw;
|
||||
ut_crc32_legacy_big_endian = ut_crc32_legacy_big_endian_hw;
|
||||
ut_crc32_byte_by_byte = ut_crc32_byte_by_byte_hw;
|
||||
ut_crc32_implementation = "Using SSE2 crc32 instructions";
|
||||
}
|
||||
|
||||
#elif defined(HAVE_CRC32_VPMSUM)
|
||||
ut_crc32 = ut_crc32_power8;
|
||||
ut_crc32_implementation = "Using POWER8 crc32 instructions";
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4290,9 +4290,9 @@ int ha_mroonga::storage_open_columns(void)
|
|||
{
|
||||
if (blob_buffers)
|
||||
{
|
||||
delete [] blob_buffers;
|
||||
::delete [] blob_buffers;
|
||||
}
|
||||
if (!(blob_buffers = new String[n_columns]))
|
||||
if (!(blob_buffers = ::new String[n_columns]))
|
||||
{
|
||||
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,13 +43,14 @@ struct tokutxn;
|
|||
#if defined(ENABLED_DEBUG_SYNC)
|
||||
|
||||
/*
|
||||
the below macros are defined in my_global.h, which is included in m_string.h,
|
||||
the below macros are defined in my_global.h
|
||||
the same macros are defined in TokuSetupCompiler.cmake as compiler options,
|
||||
undefine them here to avoid build errors
|
||||
*/
|
||||
#undef __STDC_FORMAT_MACROS
|
||||
#undef __STDC_LIMIT_MACROS
|
||||
|
||||
#include "my_global.h"
|
||||
#include "m_string.h"
|
||||
#include "debug_sync.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,105 +0,0 @@
|
|||
--- sysvars_aria.result 2015-01-09 11:49:32.000000000 +0100
|
||||
+++ sysvars_aria,32bit.result 2015-01-09 17:30:11.000000000 +0100
|
||||
@@ -7,7 +7,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 8192
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Block size to be used for Aria index pages.
|
||||
NUMERIC_MIN_VALUE 1024
|
||||
NUMERIC_MAX_VALUE 32768
|
||||
@@ -21,7 +21,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 30
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Interval between tries to do an automatic checkpoints. In seconds; 0 means 'no automatic checkpoints' which makes sense only for testing.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -35,7 +35,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1048576
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of bytes that the transaction log has to grow between checkpoints before a new checkpoint is written to the log.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -63,7 +63,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; 0 (the default) disables the feature.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 255
|
||||
@@ -91,7 +91,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Interval between commite in microseconds (1/1000000c). 0 stands for no waiting for other threads to come and do a commit in "hard" mode and no sync()/commit at all in "soft" mode. Option has only an effect if aria_group_commit is used
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -105,7 +105,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 1073741824
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Limit for transaction log size
|
||||
NUMERIC_MIN_VALUE 8388608
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -147,10 +147,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 300
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in the page cache.
|
||||
NUMERIC_MIN_VALUE 100
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 100
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -175,7 +175,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT The minimum percentage of warm blocks in key cache
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -189,7 +189,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 512
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of Aria files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open Aria files.
|
||||
NUMERIC_MIN_VALUE 128
|
||||
NUMERIC_MAX_VALUE 16384
|
||||
@@ -231,7 +231,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 128
|
||||
@@ -248,7 +248,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
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 1
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- suite/sys_vars/r/sysvars_debug.result 2017-09-14 10:37:46.000000000 +0000
|
||||
+++ suite/sys_vars/r/sysvars_debug,32bit.reject 2017-09-26 13:15:14.197012523 +0000
|
||||
@@ -21,7 +21,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Extra sleep (in microseconds) to add to binlog fsync(), for debugging
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
|
|
@ -1,558 +0,0 @@
|
|||
--- suite/sys_vars/r/sysvars_innodb.result 2017-09-14 10:37:46.000000000 +0000
|
||||
+++ suite/sys_vars/r/sysvars_innodb,32bit.reject 2017-09-26 13:13:23.685012523 +0000
|
||||
@@ -54,7 +54,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 8
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 512
|
||||
@@ -68,7 +68,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 150000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1000000
|
||||
@@ -82,7 +82,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 64
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Data file autoextend increment in megabytes
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 1000
|
||||
@@ -96,7 +96,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT
|
||||
+VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility); 1 => New style AUTOINC locking; 2 => No AUTOINC locking (unsafe for SBR)
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2
|
||||
@@ -180,10 +180,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 134217728
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Size of a single memory chunk within each buffer pool instance for resizing buffer pool. Online buffer pool resizing happens at this granularity. 0 means disable resizing buffer pool.
|
||||
NUMERIC_MIN_VALUE 1048576
|
||||
-NUMERIC_MAX_VALUE 9223372036854775807
|
||||
+NUMERIC_MAX_VALUE 2147483647
|
||||
NUMERIC_BLOCK_SIZE 1048576
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
@@ -222,7 +222,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 25
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -264,7 +264,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 64
|
||||
@@ -334,7 +334,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -446,7 +446,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1000
|
||||
@@ -488,7 +488,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 5
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -516,7 +516,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 50
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 75
|
||||
@@ -530,10 +530,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 5000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket
|
||||
NUMERIC_MIN_VALUE 1
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -796,7 +796,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 120
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 127
|
||||
@@ -894,7 +894,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 600
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -922,7 +922,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT
|
||||
+VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT Percentage of B-tree page filled during bulk insert
|
||||
NUMERIC_MIN_VALUE 10
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -936,7 +936,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Make the first page of the given tablespace dirty.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -950,7 +950,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 30
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 1000
|
||||
@@ -978,7 +978,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 3
|
||||
@@ -1006,7 +1006,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 2
|
||||
@@ -1062,7 +1062,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 6
|
||||
@@ -1090,7 +1090,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 8000000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
|
||||
NUMERIC_MIN_VALUE 1600000
|
||||
NUMERIC_MAX_VALUE 80000000
|
||||
@@ -1132,7 +1132,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 84
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
|
||||
NUMERIC_MIN_VALUE 10
|
||||
NUMERIC_MAX_VALUE 84
|
||||
@@ -1146,7 +1146,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 3
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 16
|
||||
@@ -1160,7 +1160,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 2000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
|
||||
NUMERIC_MIN_VALUE 1000
|
||||
NUMERIC_MAX_VALUE 10000
|
||||
@@ -1174,7 +1174,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 2000000000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes
|
||||
NUMERIC_MIN_VALUE 1000000
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -1202,7 +1202,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 2
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 16
|
||||
@@ -1216,7 +1216,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 640000000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
|
||||
NUMERIC_MIN_VALUE 32000000
|
||||
NUMERIC_MAX_VALUE 1600000000
|
||||
@@ -1244,7 +1244,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -1272,10 +1272,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 200
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of IOPs the server can do. Tunes the background IO rate
|
||||
NUMERIC_MIN_VALUE 100
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -1284,12 +1284,12 @@
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 2000
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
-DEFAULT_VALUE 18446744073709551615
|
||||
+DEFAULT_VALUE 4294967295
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Limit to which innodb_io_capacity can be inflated.
|
||||
NUMERIC_MIN_VALUE 100
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -1342,7 +1342,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 50
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -1356,10 +1356,10 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 16777216
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT
|
||||
+VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT The size of the buffer which InnoDB uses to write log to the log files on disk.
|
||||
NUMERIC_MIN_VALUE 262144
|
||||
-NUMERIC_MAX_VALUE 9223372036854775807
|
||||
+NUMERIC_MAX_VALUE 2147483647
|
||||
NUMERIC_BLOCK_SIZE 1024
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
@@ -1412,7 +1412,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 2
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -1454,7 +1454,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 8192
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size
|
||||
NUMERIC_MIN_VALUE 512
|
||||
NUMERIC_MAX_VALUE 16384
|
||||
@@ -1468,10 +1468,10 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 1024
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT How deep to scan LRU to keep it clean
|
||||
NUMERIC_MIN_VALUE 100
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -1524,10 +1524,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Desired maximum length of the purge queue (0 = no limit)
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -1538,7 +1538,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 10000000
|
||||
@@ -1678,10 +1678,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT
|
||||
+VARIABLE_TYPE INT
|
||||
VARIABLE_COMMENT How many files at the maximum InnoDB keeps open at the same time.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 9223372036854775807
|
||||
+NUMERIC_MAX_VALUE 2147483647
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
@@ -1706,7 +1706,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 4
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 64
|
||||
@@ -1734,7 +1734,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -1748,7 +1748,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 16384
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
|
||||
NUMERIC_MIN_VALUE 4096
|
||||
NUMERIC_MAX_VALUE 65536
|
||||
@@ -1790,7 +1790,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 300
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 5000
|
||||
@@ -1804,7 +1804,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 128
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 128
|
||||
@@ -1846,7 +1846,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 4
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 32
|
||||
@@ -1874,7 +1874,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 56
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 64
|
||||
@@ -1888,7 +1888,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 4
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 64
|
||||
@@ -1916,10 +1916,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -1944,7 +1944,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 128
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of undo logs to use (deprecated).
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 128
|
||||
@@ -1958,7 +1958,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT An InnoDB page number.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 4294967295
|
||||
@@ -2014,7 +2014,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1048576
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Memory buffer size for index creation
|
||||
NUMERIC_MIN_VALUE 65536
|
||||
NUMERIC_MAX_VALUE 67108864
|
||||
@@ -2224,7 +2224,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 1
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Size of the mutex/lock wait array.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 1024
|
||||
@@ -2252,10 +2252,10 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 30
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Count of spin-loop rounds in InnoDB mutexes (30 by default)
|
||||
NUMERIC_MIN_VALUE 0
|
||||
-NUMERIC_MAX_VALUE 18446744073709551615
|
||||
+NUMERIC_MAX_VALUE 4294967295
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -2294,7 +2294,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1000
|
||||
@@ -2308,7 +2308,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 10000
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1000000
|
||||
@@ -2378,7 +2378,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 128
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of undo logs to use.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 128
|
||||
@@ -2406,7 +2406,7 @@
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE 0
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of undo tablespaces to use.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 127
|
||||
@@ -2448,7 +2448,7 @@
|
||||
GLOBAL_VALUE_ORIGIN CONFIG
|
||||
DEFAULT_VALUE 4
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Number of background write I/O threads in InnoDB.
|
||||
NUMERIC_MIN_VALUE 1
|
||||
NUMERIC_MAX_VALUE 64
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue