mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge 10.9 into 10.10
This commit is contained in:
@@ -299,6 +299,7 @@ ENDIF()
|
||||
# MDEV-24629, we need it outside of ELSIFs
|
||||
IF(RPM MATCHES "fedora")
|
||||
ALTERNATIVE_NAME("common" "mariadb-connector-c-config" ${MARIADB_CONNECTOR_C_VERSION}-1)
|
||||
ALTERNATIVE_NAME("shared" "mariadb-connector-c" ${MARIADB_CONNECTOR_C_VERSION}-1)
|
||||
ENDIF()
|
||||
|
||||
SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# It's intentional that bzip2 compression plugin doesn't have symbols from libc
|
||||
# More info https://jira.mariadb.org/browse/MDEV-28120
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_bzip2.so
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_bzip2.so
|
||||
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_bzip2.so]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# It's intentional that LZ4 compression plugin doesn't have symbols from libc
|
||||
# More info https://jira.mariadb.org/browse/MDEV-28120
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lz4.so
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lz4.so
|
||||
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lz4.so]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# It's intentional that LZMA compression plugin doesn't have symbols from libc
|
||||
# More info https://jira.mariadb.org/browse/MDEV-28120
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzma.so
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzma.so
|
||||
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lzma.so]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# It's intentional that LZO compression plugin doesn't have symbols from libc
|
||||
# More info https://jira.mariadb.org/browse/MDEV-28120
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzo.so
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_lzo.so
|
||||
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_lzo.so]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# It's intentional that Snappy compression plugin doesn't have symbols from libc
|
||||
# More info https://jira.mariadb.org/browse/MDEV-28120
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_snappy.so
|
||||
library-not-linked-against-libc usr/lib/mysql/plugin/provider_snappy.so
|
||||
library-not-linked-against-libc [usr/lib/mysql/plugin/provider_snappy.so]
|
||||
|
||||
176
debian/salsa-ci.yml
vendored
176
debian/salsa-ci.yml
vendored
@@ -56,6 +56,14 @@ build i386:
|
||||
script:
|
||||
- *autobake-deb-steps
|
||||
|
||||
build bullseye-backports:
|
||||
extends: .build-package
|
||||
variables:
|
||||
RELEASE: bullseye-backports
|
||||
|
||||
# Buster only has libfmt 6.1 but 7.0 is required, so backport build for Buster
|
||||
# is not possible unless somebody packages libfmt7-dev for Buster.
|
||||
|
||||
build sid:
|
||||
extends: .build-package
|
||||
script:
|
||||
@@ -112,6 +120,12 @@ blhc:
|
||||
mysql --table -e "SELECT * FROM plugin;" mysql
|
||||
mysql --table -e "SHOW PLUGINS;" mysql
|
||||
|
||||
# Readline was removed from Debian Sid (and Bullseye) in Feb 2021. To be able to install older
|
||||
# versions of MariaDB that depend on it, fetch and install it from Buster.
|
||||
.test-install-readline-in-sid-for-backwards-compat: &test-install-readline-in-sid-for-backwards-compat |
|
||||
curl -sS -O http://ftp.de.debian.org/debian/pool/main/r/readline5/libreadline5_5.2+dfsg-3+b13_amd64.deb
|
||||
apt-get -qq install --no-install-recommends --yes ./libreadline5_5.2+dfsg-3+b13_amd64.deb
|
||||
|
||||
.test-enable-bullseye-repos: &test-enable-bullseye-repos
|
||||
# Replace any old repos with just Sid
|
||||
- echo 'deb http://deb.debian.org/debian bullseye main' > /etc/apt/sources.list
|
||||
@@ -119,6 +133,17 @@ blhc:
|
||||
- apt-get update -qq
|
||||
- apt-get install -y apt
|
||||
|
||||
.test-enable-buster-backports-repos: &test-enable-buster-backports-repos |
|
||||
# Enable buster-backports (assumes environment already Debian Buster)
|
||||
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/buster-backports.list
|
||||
# Increase default backports priority policy from '100' to '500' so it can actually be used
|
||||
cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies
|
||||
Package: *
|
||||
Pin: release n=buster-*
|
||||
Pin-Priority: 500
|
||||
EOF
|
||||
apt-get update -qq
|
||||
|
||||
.test-enable-bullseye-backports-repos: &test-enable-bullseye-backports-repos |
|
||||
# Enable bullseye-backports (assumes environment already Debian Bullseye)
|
||||
echo 'deb http://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/bullseye-backports.list
|
||||
@@ -130,16 +155,28 @@ blhc:
|
||||
EOF
|
||||
apt-get update -qq
|
||||
|
||||
.test-enable-buster-backports-repos: &test-enable-buster-backports-repos |
|
||||
# Enable buster-backports (assumes environment already Debian Buster)
|
||||
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/buster-backports.list
|
||||
# Increase default backports priority policy from '100' to '500' so it can actually be used
|
||||
cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies
|
||||
Package: *
|
||||
Pin: release n=buster-*
|
||||
Pin-Priority: 500
|
||||
EOF
|
||||
apt-get update -qq
|
||||
.test-enable-sid-repos: &test-enable-sid-repos
|
||||
# Apply usrmerge workaround for Stretch/Buster/Bullseye to Bookworm/Sid upgrades
|
||||
- echo 'this system will not be supported in the future' > /etc/unsupported-skip-usrmerge-conversion
|
||||
# Replace any old repos with just Sid
|
||||
- echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
|
||||
# Upgrade minimal stack first
|
||||
- apt-get update -qq
|
||||
# Next step will fail on https://bugs.debian.org/993755
|
||||
# /usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot
|
||||
# open shared object file: No such file or directory
|
||||
# dpkg: error processing package libc6:amd64 (--configure):
|
||||
- apt-get install -y apt || true
|
||||
# Apply workaround
|
||||
- cd $(mktemp -d) # Use temp dir where apt can download and unpack files
|
||||
- apt-get -y download libcrypt1
|
||||
- dpkg-deb -x libcrypt1_*.deb .
|
||||
- cp -ra lib/* /lib/
|
||||
- cd - # Back to /builds/$USER/mariadb-server/debian/output
|
||||
- find /lib/*/libcrypt.* -ls # Show that new libcrypt is there
|
||||
- apt-get -y --fix-broken install
|
||||
# Complete upgrade of minimal stack
|
||||
- apt-get install -y apt
|
||||
|
||||
.test-install: &test-install
|
||||
# Install MariaDB built in this commit
|
||||
@@ -252,35 +289,6 @@ mariadb-10.5 Bullseye upgrade:
|
||||
variables:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
|
||||
mariadb-10.3 with Buster backports upgrade:
|
||||
stage: upgrade extras
|
||||
needs:
|
||||
- job: build buster-backports
|
||||
image: debian:buster
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_BUILD_NAME"
|
||||
paths:
|
||||
- ${WORKING_DIR}/debug
|
||||
script:
|
||||
- *test-prepare-container
|
||||
# Install everything MariaDB 10.3 currently in Debian Buster
|
||||
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadb*'
|
||||
# Verify installation of MariaDB from Buster
|
||||
- *test-verify-initial
|
||||
# Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4)
|
||||
- *test-enable-buster-backports-repos
|
||||
- *test-install
|
||||
# mariadb-10.3 in Buster ships a /etc/init.d/mysql so it should continue to work
|
||||
- service mysql status
|
||||
- service mariadb status
|
||||
- *test-verify-final
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
except:
|
||||
variables:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
|
||||
mariadb-10.3 Buster upgrade:
|
||||
stage: upgrade from Buster
|
||||
needs:
|
||||
@@ -490,6 +498,43 @@ mysql-8.0 from Ubuntu 22.04 upgrade:
|
||||
variables:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
|
||||
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
|
||||
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
|
||||
mysql-community-cluster-8.0 from MySQL.com upgrade:
|
||||
stage: upgrade extras
|
||||
needs:
|
||||
- job: build
|
||||
image: debian:${RELEASE}
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_BUILD_NAME"
|
||||
paths:
|
||||
- ${WORKING_DIR}/debug
|
||||
script:
|
||||
- *test-prepare-container
|
||||
- apt-get install --no-install-recommends --yes ca-certificates curl systemctl
|
||||
- curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x859be8d7c586f538430b19c2467b942d3a79bd29" -o /etc/apt/trusted.gpg.d/mysql.asc
|
||||
- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list
|
||||
- apt-get update -qq
|
||||
- apt-get install -y mysql-cluster-community-server
|
||||
- sed 's/ExecStartPre=+/ExecStartPre=/' -i /lib/systemd/system/mysql.service # Hack to make file compatible with systemctl shim
|
||||
- systemctl start mysql
|
||||
- dpkg -l | grep -iE 'maria|mysql|galera'
|
||||
- systemctl status mysql; mysql -e 'SELECT VERSION()'
|
||||
- systemctl stop mysql # Stop manually as maintainer scripts don't handle this with systemctl shim
|
||||
- *test-install
|
||||
# Ignore systemctl shim result as MariaDB systemd file is incompatible with it and yields:
|
||||
# ERROR:systemctl:the ExecStartPre control process exited with error code
|
||||
- systemctl status mysql || true
|
||||
- mysql -e 'SELECT VERSION()' || true
|
||||
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
|
||||
- *test-verify-final
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
except:
|
||||
variables:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
|
||||
mariadb.org 10.9 to mariadb upgrade:
|
||||
stage: upgrade extras
|
||||
needs:
|
||||
@@ -506,7 +551,7 @@ mariadb.org 10.9 to mariadb upgrade:
|
||||
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
|
||||
- echo "deb https://deb.mariadb.org/10.9/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list
|
||||
- apt-get update
|
||||
- apt-get install -y mariadb-server-10.9
|
||||
- apt-get install -y mariadb-server-10.9 mariadb-client-10.9
|
||||
- *test-verify-initial
|
||||
# Install MariaDB built in this commit
|
||||
# Force downgrades so our version installs on top of upstream revision, e.g. 1:10.9.1-1 vs 1:10.9.1+mariadb~sid
|
||||
@@ -556,43 +601,6 @@ mariadb.org-10.8 to mariadb upgrade:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
allow_failure: true
|
||||
|
||||
# Upgrading from MySQL 8.0 with datadir in place is not possible. Users need to do a data dump.
|
||||
# The Debian maintainer scripts detect this situation and simply moves old datadir aside and start fresh.
|
||||
mysql-community-cluster-8.0 from MySQL.com upgrade:
|
||||
stage: upgrade extras
|
||||
needs:
|
||||
- job: build
|
||||
image: debian:${RELEASE}
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_BUILD_NAME"
|
||||
paths:
|
||||
- ${WORKING_DIR}/debug
|
||||
script:
|
||||
- *test-prepare-container
|
||||
- apt-get install --no-install-recommends --yes ca-certificates curl systemctl
|
||||
- curl -sS "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x859be8d7c586f538430b19c2467b942d3a79bd29" -o /etc/apt/trusted.gpg.d/mysql.asc
|
||||
- echo "deb https://repo.mysql.com/apt/debian/ bullseye mysql-cluster-8.0" > /etc/apt/sources.list.d/mysql.list
|
||||
- apt-get update -qq
|
||||
- apt-get install -y mysql-cluster-community-server
|
||||
- sed 's/ExecStartPre=+/ExecStartPre=/' -i /lib/systemd/system/mysql.service # Hack to make file compatible with systemctl shim
|
||||
- systemctl start mysql
|
||||
- dpkg -l | grep -iE 'maria|mysql|galera'
|
||||
- systemctl status mysql; mysql -e 'SELECT VERSION()'
|
||||
- systemctl stop mysql # Stop manually as maintainer scripts don't handle this with systemctl shim
|
||||
- *test-install
|
||||
# Ignore systemctl shim result as MariaDB systemd file is incompatible with it and yields:
|
||||
# ERROR:systemctl:the ExecStartPre control process exited with error code
|
||||
- systemctl status mysql || true
|
||||
- mysql -e 'SELECT VERSION()' || true
|
||||
- sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server
|
||||
- *test-verify-final
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
except:
|
||||
variables:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
|
||||
mariadb.org-10.7 to mariadb upgrade:
|
||||
stage: upgrade extras
|
||||
needs:
|
||||
@@ -685,11 +693,11 @@ mariadb.org-10.5 to mariadb upgrade:
|
||||
variables:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
|
||||
mariadb.org-10.4 to mariadb with Buster backports upgrade:
|
||||
mariadb.org-10.4 to mariadb upgrade:
|
||||
stage: upgrade extras
|
||||
needs:
|
||||
- job: build buster-backports
|
||||
image: debian:buster
|
||||
- job: build
|
||||
image: debian:${RELEASE}
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_BUILD_NAME"
|
||||
@@ -701,6 +709,7 @@ mariadb.org-10.4 to mariadb with Buster backports upgrade:
|
||||
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
|
||||
- echo "deb https://archive.mariadb.org/mariadb-10.4/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list
|
||||
- apt-get update -qq
|
||||
- *test-install-readline-in-sid-for-backwards-compat
|
||||
- apt-get install -y mariadb-server-10.4
|
||||
# MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
|
||||
# it must be installed here manually
|
||||
@@ -719,11 +728,11 @@ mariadb.org-10.4 to mariadb with Buster backports upgrade:
|
||||
variables:
|
||||
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|
||||
|
||||
mariadb.org-10.3 to mariadb with Buster backports upgrade:
|
||||
mariadb.org-10.3 to mariadb upgrade:
|
||||
stage: upgrade extras
|
||||
needs:
|
||||
- job: build bullseye-backports
|
||||
image: debian:bullseye
|
||||
- job: build
|
||||
image: debian:${RELEASE}
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_BUILD_NAME"
|
||||
@@ -735,6 +744,7 @@ mariadb.org-10.3 to mariadb with Buster backports upgrade:
|
||||
- curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc
|
||||
- echo "deb https://archive.mariadb.org/mariadb-10.3/repo/debian buster main" > /etc/apt/sources.list.d/mariadb.list
|
||||
- apt-get update -qq
|
||||
- *test-install-readline-in-sid-for-backwards-compat
|
||||
- apt-get install -y mariadb-server-10.3
|
||||
- *test-verify-initial
|
||||
# Buster backports is needed for liburing1 (>= 0.7) and galera-4 (>= 26.4)
|
||||
|
||||
21
debian/source/lintian-overrides
vendored
21
debian/source/lintian-overrides
vendored
@@ -1,3 +1,6 @@
|
||||
# MariaDB use high enough debhelper so this is should
|
||||
# be considered as bug in lintia
|
||||
missing-build-dependency-for-dh-addon systemd *
|
||||
# Necessary for drop-in-place-replacement upgrades on mysql-server/-client
|
||||
# since package breaks/replaces these but at the same time also provides them
|
||||
version-substvar-for-external-package mariadb-client-core -> mysql-client-5.5
|
||||
@@ -9,23 +12,11 @@ version-substvar-for-external-package mariadb-server-10.9 -> mysql-client-8.*
|
||||
version-substvar-for-external-package mariadb-client-10.9 -> mysql-client-core-5.*
|
||||
version-substvar-for-external-package mariadb-client-10.9 -> mysql-client-core-8.*
|
||||
version-substvar-for-external-package libmariadbd-dev -> libmariadbclient-dev
|
||||
# Intentional version-substvar-for-external-package as long as mariadb-server
|
||||
# provides mariadb-server-10.10 and mariadb-client provides mariadb-client-10.10
|
||||
version-substvar-for-external-package Conflicts (line 408) ${source:Version} mariadb-client -> mariadb-client-10.10
|
||||
version-substvar-for-external-package Conflicts (line 575) ${source:Version} mariadb-server-core -> mariadb-server-core-10.10
|
||||
version-substvar-for-external-package Conflicts (line 711) ${source:Version} mariadb-server -> mariadb-server-10.10
|
||||
# These are left for reason version-substvar-for-external-package
|
||||
version-substvar-for-external-package Conflicts (line 95) ${source:Version} libmariadb-dev-compat -> libmariadbclient-dev
|
||||
version-substvar-for-external-package Replaces (line 109) ${source:Version} libmariadb-dev-compat -> libmariadbclient-dev
|
||||
version-substvar-for-external-package Replaces (line 330) ${source:Version} mariadb-client-core -> mariadb-client-10.10
|
||||
version-substvar-for-external-package Replaces (line 330) ${source:Version} mariadb-client-core -> mariadb-server-core-10.10
|
||||
version-substvar-for-external-package Replaces (line 481) ${source:Version} mariadb-client -> mariadb-client-10.10
|
||||
version-substvar-for-external-package Replaces (line 481) ${source:Version} mariadb-client -> mariadb-client-core-10.10
|
||||
version-substvar-for-external-package Replaces (line 481) ${source:Version} mariadb-client -> mariadb-server-10.10
|
||||
version-substvar-for-external-package Replaces (line 481) ${source:Version} mariadb-client -> mariadb-server-core-10.10
|
||||
version-substvar-for-external-package Replaces (line 626) ${source:Version} mariadb-server-core -> mariadb-client-10.10
|
||||
version-substvar-for-external-package Replaces (line 626) ${source:Version} mariadb-server-core -> mariadb-server-10.10
|
||||
version-substvar-for-external-package Replaces (line 748) ${source:Version} mariadb-server -> mariadb-client-10.10
|
||||
version-substvar-for-external-package Replaces (line 748) ${source:Version} mariadb-server -> mariadb-server-10.10
|
||||
version-substvar-for-external-package Conflicts ${source:Version} libmariadb-dev-compat -> libmariadbclient-dev [*]
|
||||
version-substvar-for-external-package Replaces ${source:Version} libmariadb-dev-compat -> libmariadbclient-dev [*]
|
||||
# ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124
|
||||
source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2
|
||||
source-is-missing [storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2]
|
||||
|
||||
@@ -201,7 +201,7 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <type_traits>
|
||||
template<typename T> inline const char *_swl_check(T s)
|
||||
template<typename T> inline constexpr const char *_swl_check(T s)
|
||||
{
|
||||
static_assert(std::is_same<T, const char (&)[sizeof(T)]>::value
|
||||
|| std::is_same<T, const char [sizeof(T)]>::value,
|
||||
|
||||
@@ -40,7 +40,15 @@
|
||||
/* GNU C/C++ */
|
||||
#if defined __GNUC__
|
||||
# define MY_ALIGN_EXT
|
||||
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
|
||||
|
||||
/*
|
||||
__builtin_unreachable() removes the "statement may fall through" warning-as-
|
||||
error when MY_ASSERT_UNREACHABLE() is used in "case xxx:" in switch (...)
|
||||
statements.
|
||||
abort() is there to prevent the execution from reaching the
|
||||
__builtin_unreachable() as this may cause misleading stack traces.
|
||||
*/
|
||||
# define MY_ASSERT_UNREACHABLE() { abort(); __builtin_unreachable(); }
|
||||
|
||||
/* Microsoft Visual C++ */
|
||||
#elif defined _MSC_VER
|
||||
@@ -88,7 +96,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef MY_ASSERT_UNREACHABLE
|
||||
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
|
||||
# define MY_ASSERT_UNREACHABLE() do { abort(); } while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# The time on ANALYSE FORMAT=JSON is rather variable
|
||||
# Remove non-deterministic parts of ANALYZE FORMAT=JSON output:
|
||||
# - any timings
|
||||
# - Buffer sizes (depend on pointer size)
|
||||
# - r_engine_stats depends on buffer pool state and whether old record versions
|
||||
# were purged.
|
||||
|
||||
--replace_regex /("(r_[a-z_]*_time(_in_progress)?_ms|r_buffer_size)": )[^, \n]*/\1"REPLACED"/
|
||||
--replace_regex /("(r_[a-z_]*_time(_in_progress)?_ms|r_buffer_size)": )[^, \n]*/\1"REPLACED"/ /("r_engine_stats":) {[^}]*}/\1 REPLACED/
|
||||
|
||||
85
mysql-test/include/log_grep.inc
Normal file
85
mysql-test/include/log_grep.inc
Normal file
@@ -0,0 +1,85 @@
|
||||
if ($log_expected_matches) {
|
||||
--echo [log_grep.inc] file: $log_file pattern: $grep_pattern expected_matches: $log_expected_matches
|
||||
}
|
||||
if (!$log_expected_matches) {
|
||||
--echo [log_grep.inc] file: $log_file pattern: $grep_pattern
|
||||
}
|
||||
--let LOG_GREP_PERL_RESULT=$MYSQL_TMP_DIR/log_grep_perl_result.test
|
||||
perl;
|
||||
|
||||
open my $command_file, ">", "$ENV{'LOG_GREP_PERL_RESULT'}" or die "Cannot create file";
|
||||
|
||||
$log_file= $ENV{'log_file'};
|
||||
$log_file_full_path= $ENV{'log_file_full_path'};
|
||||
$log_slow_rate_test= $ENV{'log_slow_rate_test'};
|
||||
open(FILE, "$log_file_full_path")
|
||||
or die("Cannot open file $log_file_full_path: $!\n");
|
||||
|
||||
if ($log_slow_rate_test) {
|
||||
$one= 0;
|
||||
$two= 0;
|
||||
$three= 0;
|
||||
while(<FILE>) {
|
||||
$one++ if(/'connection_one'/);
|
||||
$two++ if(/'connection_two'/);
|
||||
$three++ if(/'connection_three'/);
|
||||
}
|
||||
$sum= $one + $two + $three;
|
||||
$zero= 0;
|
||||
if ($one == 0) {
|
||||
$zero++;
|
||||
}
|
||||
if ($two == 0) {
|
||||
$zero++;
|
||||
}
|
||||
if ($three == 0) {
|
||||
$zero++;
|
||||
}
|
||||
print "[log_grep.inc] sum: $sum\n";
|
||||
print "[log_grep.inc] zero: $zero\n";
|
||||
}
|
||||
else {
|
||||
$grep_pattern= $ENV{'grep_pattern'};
|
||||
$lines= 0;
|
||||
while(<FILE>) {
|
||||
$lines++ if (/$grep_pattern/);
|
||||
}
|
||||
$log_expected_matches= $ENV{'log_expected_matches'};
|
||||
if ($log_expected_matches) {
|
||||
if ($log_expected_matches != $lines) {
|
||||
print "[log_grep.inc] ERROR: expected matches: $log_expected_matches, actual matches: $lines\n";
|
||||
print "[log_grep.inc] log file at $log_file_full_path\n";
|
||||
close(FILE);
|
||||
open(FILE, "$log_file_full_path")
|
||||
or die("Cannot open file $log_file_full_path: $!\n");
|
||||
while (<FILE>) {
|
||||
print ;
|
||||
}
|
||||
print $command_file "--let \$log_grep_failed= 1;\n";
|
||||
} else {
|
||||
print "[log_grep.inc] found expected match count: $log_expected_matches\n";
|
||||
}
|
||||
} else {
|
||||
print "[log_grep.inc] lines: $lines\n";
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
close($command_file);
|
||||
EOF
|
||||
--source $LOG_GREP_PERL_RESULT
|
||||
--remove_file $LOG_GREP_PERL_RESULT
|
||||
if ($log_grep_failed)
|
||||
{
|
||||
SHOW SESSION STATUS LIKE 'Slow_queries';
|
||||
SHOW GLOBAL VARIABLES LIKE 'log%';
|
||||
SHOW GLOBAL VARIABLES LIKE 'long_query_time';
|
||||
SHOW GLOBAL VARIABLES LIKE 'min_examined_row_limit';
|
||||
SHOW GLOBAL VARIABLES LIKE 'query_cache%';
|
||||
SHOW GLOBAL VARIABLES LIKE 'slow_query%';
|
||||
SHOW SESSION VARIABLES LIKE 'log%';
|
||||
SHOW SESSION VARIABLES LIKE 'long_query_time';
|
||||
SHOW SESSION VARIABLES LIKE 'min_examined_row_limit';
|
||||
SHOW SESSION VARIABLES LIKE 'query_cache%';
|
||||
SHOW SESSION VARIABLES LIKE 'slow_query%';
|
||||
--die Testcase failed!
|
||||
}
|
||||
6
mysql-test/include/log_slow_cleanup.inc
Normal file
6
mysql-test/include/log_slow_cleanup.inc
Normal file
@@ -0,0 +1,6 @@
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp $log_slow_prefix-*.slog
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL log_output= $log_output_old;
|
||||
EVAL SET GLOBAL slow_query_log_file= "$slow_query_log_file_old";
|
||||
EVAL SET GLOBAL slow_query_log= $slow_query_log_old;
|
||||
--enable_query_log
|
||||
25
mysql-test/include/log_slow_grep.inc
Normal file
25
mysql-test/include/log_slow_grep.inc
Normal file
@@ -0,0 +1,25 @@
|
||||
# Common extensions to the slow query log
|
||||
--let grep_pattern = ^# Thread_id: .+ Schema: .+ QC_hit: (Yes|No)\$
|
||||
--let log_expected_matches = $log_slow_verbosity_expected_matches
|
||||
--source include/log_grep.inc
|
||||
--let grep_pattern = ^# Query_time: \d+\.\d+ Lock_time: \d+\.\d+ Rows_sent: \d+ Rows_examined: \d+\$
|
||||
--source include/log_grep.inc
|
||||
--let grep_pattern = ^# Rows_affected: \d+ Bytes_sent: \d+\$
|
||||
--source include/log_grep.inc
|
||||
|
||||
# Query plan
|
||||
--let log_expected_matches = $log_slow_verbosity_queryplan_expected_matches
|
||||
--let grep_pattern = ^# Full_scan: (Yes|No) Full_join: (Yes|No) Tmp_table: (Yes|No) Tmp_table_on_disk: (Yes|No)\$
|
||||
--source include/log_grep.inc
|
||||
--let grep_pattern = ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\ Priority_queue: (Yes|No)\$
|
||||
--source include/log_grep.inc
|
||||
|
||||
# Temp tables
|
||||
--let log_expected_matches = $log_slow_verbosity_tmptable_expected_matches
|
||||
--source include/log_grep.inc
|
||||
--let grep_pattern = ^# Tmp_tables: \d+ Tmp_disk_tables: \d+\$
|
||||
--source include/log_grep.inc
|
||||
|
||||
# InnoDB/Engines
|
||||
--let log_expected_matches = $log_slow_innodb_expected_matches
|
||||
--let grep_pattern = ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+\n# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+\$
|
||||
8
mysql-test/include/log_slow_prepare.inc
Normal file
8
mysql-test/include/log_slow_prepare.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
--disable_query_log
|
||||
--let slow_query_log_old= `select @@slow_query_log`
|
||||
--let slow_query_log_file_old= `select @@slow_query_log_file`
|
||||
--let log_output_old= `select @@log_output`
|
||||
|
||||
SET GLOBAL slow_query_log=0;
|
||||
SET GLOBAL log_output=FILE;
|
||||
--enable_query_log
|
||||
6
mysql-test/include/log_slow_start.inc
Normal file
6
mysql-test/include/log_slow_start.inc
Normal file
@@ -0,0 +1,6 @@
|
||||
--disable_query_log
|
||||
--let log_file_full_path=$MYSQLTEST_VARDIR/tmp/$log_file.slog
|
||||
--echo [slow_log_start.inc] $log_file
|
||||
EVAL SET GLOBAL slow_query_log_file="$log_file_full_path";
|
||||
SET GLOBAL slow_query_log=1;
|
||||
--enable_query_log
|
||||
4
mysql-test/include/log_slow_stop.inc
Normal file
4
mysql-test/include/log_slow_stop.inc
Normal file
@@ -0,0 +1,4 @@
|
||||
--disable_query_log
|
||||
SET GLOBAL slow_query_log=0;
|
||||
--echo [log_slow_stop.inc] $log_file
|
||||
--enable_query_log
|
||||
5
mysql-test/main/analyze_engine_stats.combinations
Normal file
5
mysql-test/main/analyze_engine_stats.combinations
Normal file
@@ -0,0 +1,5 @@
|
||||
[slow_query_log_on]
|
||||
slow_query_log=ON
|
||||
|
||||
[slow_query_log_off]
|
||||
slow_query_log=OFF
|
||||
109
mysql-test/main/analyze_engine_stats.result
Normal file
109
mysql-test/main/analyze_engine_stats.result
Normal file
@@ -0,0 +1,109 @@
|
||||
create table t1 (
|
||||
pk int not null,
|
||||
a varchar(64),
|
||||
b varchar(64),
|
||||
c varchar(64)
|
||||
) engine=innodb;
|
||||
insert into t1 select
|
||||
seq, seq, seq, seq
|
||||
from
|
||||
seq_1_to_10000;
|
||||
analyze table t1 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
# Note the r_engine_stats below. Only non-zero members are printed
|
||||
select '$out' as X;
|
||||
X
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 1,
|
||||
"rows": 10000,
|
||||
"r_rows": 10000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {
|
||||
"pages_accessed": "REPLACED"
|
||||
},
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.pk < 120000"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
set @js='$out';
|
||||
set @out=(select json_extract(@js,'$**.r_engine_stats.pages_accessed'));
|
||||
select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_ACCESSED_MORE_THAN_ZERO;
|
||||
PAGES_ACCESSED_MORE_THAN_ZERO
|
||||
1
|
||||
#
|
||||
# Try an UPDATE
|
||||
#
|
||||
select '$out' as X;
|
||||
X
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"table": {
|
||||
"update": 1,
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 10000,
|
||||
"r_rows": 10000,
|
||||
"r_filtered": 100,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": {
|
||||
"pages_accessed": "REPLACED",
|
||||
"pages_updated": "REPLACED"
|
||||
},
|
||||
"attached_condition": "t1.pk < 120000"
|
||||
}
|
||||
}
|
||||
}
|
||||
set @js='$out';
|
||||
set @out=(select json_extract(@js,'$**.r_engine_stats.pages_updated'));
|
||||
select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_UPDATED_MORE_THAN_ZERO;
|
||||
PAGES_UPDATED_MORE_THAN_ZERO
|
||||
1
|
||||
#
|
||||
# Try a DELETE
|
||||
#
|
||||
select '$out' as X;
|
||||
X
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"table": {
|
||||
"delete": 1,
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 10000,
|
||||
"r_rows": 10000,
|
||||
"r_filtered": 50,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": {
|
||||
"pages_accessed": "REPLACED",
|
||||
"pages_updated": "REPLACED"
|
||||
},
|
||||
"attached_condition": "t1.pk MOD 2 = 1"
|
||||
}
|
||||
}
|
||||
}
|
||||
set @js='$out';
|
||||
set @out=(select json_extract(@js,'$**.r_engine_stats.pages_updated'));
|
||||
select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_UPDATED_MORE_THAN_ZERO;
|
||||
PAGES_UPDATED_MORE_THAN_ZERO
|
||||
1
|
||||
drop table t1;
|
||||
64
mysql-test/main/analyze_engine_stats.test
Normal file
64
mysql-test/main/analyze_engine_stats.test
Normal file
@@ -0,0 +1,64 @@
|
||||
#
|
||||
# Tests for r_engine_stats in ANALYZE FORMAT=JSON output
|
||||
#
|
||||
--source include/analyze-format.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
create table t1 (
|
||||
pk int not null,
|
||||
a varchar(64),
|
||||
b varchar(64),
|
||||
c varchar(64)
|
||||
) engine=innodb;
|
||||
|
||||
insert into t1 select
|
||||
seq, seq, seq, seq
|
||||
from
|
||||
seq_1_to_10000;
|
||||
|
||||
analyze table t1 persistent for all;
|
||||
|
||||
--echo # Note the r_engine_stats below. Only non-zero members are printed
|
||||
let $out=`
|
||||
ANALYZE FORMAT=json
|
||||
select * from t1 where pk < 120000;
|
||||
`;
|
||||
|
||||
# Don't use "source include/analyze-format.inc" as it replaces r_engine_stats
|
||||
# Replace the "pages_accessed" value, too, as it is different for some
|
||||
# platforms...
|
||||
--replace_regex /("(r_[a-z_]*_time(_in_progress)?_ms|r_buffer_size|pages_accessed)": )[^, \n]*/\1"REPLACED"/
|
||||
evalp select '$out' as X;
|
||||
|
||||
evalp set @js='$out';
|
||||
set @out=(select json_extract(@js,'$**.r_engine_stats.pages_accessed'));
|
||||
select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_ACCESSED_MORE_THAN_ZERO;
|
||||
|
||||
--echo #
|
||||
--echo # Try an UPDATE
|
||||
--echo #
|
||||
|
||||
let $out=`analyze format=json update t1 set b = b-1 where pk < 120000`;
|
||||
|
||||
--replace_regex /("(r_[a-z_]*_time_ms|pages_accessed|pages_updated)": )[^, \n]*/\1"REPLACED"/
|
||||
evalp select '$out' as X;
|
||||
|
||||
evalp set @js='$out';
|
||||
set @out=(select json_extract(@js,'$**.r_engine_stats.pages_updated'));
|
||||
select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_UPDATED_MORE_THAN_ZERO;
|
||||
|
||||
--echo #
|
||||
--echo # Try a DELETE
|
||||
--echo #
|
||||
let $out=`analyze format=json delete from t1 where mod(pk,2)=1`;
|
||||
|
||||
--replace_regex /("(r_[a-z_]*_time_ms|pages_accessed|pages_updated)": )[^, \n]*/\1"REPLACED"/
|
||||
evalp select '$out' as X;
|
||||
|
||||
evalp set @js='$out';
|
||||
set @out=(select json_extract(@js,'$**.r_engine_stats.pages_updated'));
|
||||
select cast(json_extract(@out,'$[0]') as DOUBLE) > 0 as PAGES_UPDATED_MORE_THAN_ZERO;
|
||||
|
||||
drop table t1;
|
||||
|
||||
@@ -19,6 +19,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 30,
|
||||
"attached_condition": "t0.a < 3"
|
||||
@@ -52,6 +53,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 0,
|
||||
"attached_condition": "t0.a > 9 and t0.a is not null"
|
||||
@@ -69,6 +71,7 @@ ANALYZE
|
||||
"r_loops": 0,
|
||||
"rows": 1,
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": null
|
||||
}
|
||||
@@ -99,6 +102,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t0.a is not null"
|
||||
@@ -118,6 +122,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 40,
|
||||
"attached_condition": "t1.b < 4"
|
||||
@@ -149,6 +154,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 20,
|
||||
"attached_condition": "tbl1.b < 20"
|
||||
@@ -164,6 +170,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 60,
|
||||
"attached_condition": "tbl2.b < 60"
|
||||
@@ -199,6 +206,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 20,
|
||||
"attached_condition": "tbl1.b < 20"
|
||||
@@ -214,6 +222,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 60,
|
||||
"attached_condition": "tbl2.b < 60"
|
||||
@@ -258,6 +267,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a is not null"
|
||||
@@ -277,6 +287,7 @@ ANALYZE
|
||||
"r_rows": 0.2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"using_index": true
|
||||
@@ -316,6 +327,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 50,
|
||||
"attached_condition": "test.t1.a < 5"
|
||||
@@ -352,7 +364,8 @@ ANALYZE
|
||||
"rows": 1000,
|
||||
"r_rows": 1000,
|
||||
"r_filtered": 100,
|
||||
"r_total_time_ms": "REPLACED"
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -378,6 +391,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 50,
|
||||
"index_condition": "t1.pk < 10",
|
||||
@@ -406,6 +420,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_filtered": 50,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"attached_condition": "t1.pk < 10 and t1.b > 4"
|
||||
}
|
||||
}
|
||||
@@ -448,6 +463,7 @@ ANALYZE
|
||||
"r_rows": 5,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -474,6 +490,7 @@ ANALYZE
|
||||
"r_rows": 203.8,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 98.13542689
|
||||
}
|
||||
@@ -515,6 +532,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 50,
|
||||
"attached_condition": "tbl1.a < 5"
|
||||
@@ -539,6 +557,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 20,
|
||||
"attached_condition": "tbl2.a in (2,3)"
|
||||
@@ -593,6 +612,7 @@ ANALYZE
|
||||
"r_rows": 256,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -629,6 +649,7 @@ ANALYZE
|
||||
"r_rows": 256,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -676,6 +697,7 @@ ANALYZE
|
||||
"r_rows": 256,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -710,6 +732,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -724,6 +747,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 0,
|
||||
"attached_condition": "<in_optimizer>(t2.b,t2.b in (subquery#2))"
|
||||
@@ -756,6 +780,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -815,6 +840,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -829,6 +855,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 0,
|
||||
"attached_condition": "t3.f3 in (1,2)"
|
||||
@@ -859,6 +886,7 @@ ANALYZE
|
||||
"r_loops": 0,
|
||||
"rows": 2,
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": null
|
||||
}
|
||||
@@ -871,6 +899,7 @@ ANALYZE
|
||||
"r_loops": 0,
|
||||
"rows": 2,
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": null
|
||||
},
|
||||
@@ -922,6 +951,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 0,
|
||||
"attached_condition": "t1.a < 0"
|
||||
@@ -952,6 +982,7 @@ ANALYZE
|
||||
"r_loops": 0,
|
||||
"rows": 10,
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": null,
|
||||
"attached_condition": "t2.a < t1.a"
|
||||
@@ -1008,6 +1039,7 @@ ANALYZE
|
||||
"r_rows": 1000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 10,
|
||||
"r_filtered": 10,
|
||||
"attached_condition": "t11.a < 100"
|
||||
@@ -1023,6 +1055,7 @@ ANALYZE
|
||||
"r_rows": 1000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 70,
|
||||
"r_filtered": 70,
|
||||
"attached_condition": "t10.a < 700"
|
||||
@@ -1064,6 +1097,7 @@ ANALYZE
|
||||
"r_rows": 1000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 10,
|
||||
"r_filtered": 10,
|
||||
"attached_condition": "t11.a < 100 and t11.b is not null"
|
||||
@@ -1083,6 +1117,7 @@ ANALYZE
|
||||
"r_rows": 1000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 70,
|
||||
"r_filtered": 70,
|
||||
"attached_condition": "t10.a < 700"
|
||||
|
||||
@@ -51,6 +51,7 @@ X
|
||||
"r_rows": 500,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a < 700 and t1.b is not null"
|
||||
@@ -70,6 +71,7 @@ X
|
||||
"r_rows": 500,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 20,
|
||||
"attached_condition": "t2.a < 100"
|
||||
@@ -139,6 +141,7 @@ X
|
||||
"r_rows": 1000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a is not null"
|
||||
@@ -158,6 +161,7 @@ X
|
||||
"r_rows": 2000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
|
||||
@@ -52,7 +52,8 @@ ANALYZE
|
||||
"rows": 10000,
|
||||
"r_rows": 10000,
|
||||
"r_filtered": 100,
|
||||
"r_total_time_ms": "REPLACED"
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,6 +106,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_filtered": 100,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"attached_condition": "t2.a < 10"
|
||||
}
|
||||
}
|
||||
@@ -154,7 +156,8 @@ ANALYZE
|
||||
"rows": 10000,
|
||||
"r_rows": 10000,
|
||||
"r_filtered": 100,
|
||||
"r_total_time_ms": "REPLACED"
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,6 +234,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t0.a is not null"
|
||||
@@ -250,6 +254,7 @@ ANALYZE
|
||||
"r_rows": 0.4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -332,6 +337,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t0.a is not null"
|
||||
@@ -353,6 +359,7 @@ ANALYZE
|
||||
"r_rows": 0.4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -399,6 +406,7 @@ ANALYZE
|
||||
"r_rows": 1000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 50,
|
||||
"attached_condition": "t2.a MOD 2 = 0"
|
||||
@@ -452,6 +460,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -466,6 +475,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -536,6 +546,7 @@ ANALYZE
|
||||
"r_rows": 5,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 80,
|
||||
"attached_condition": "t6.b > 0 and t6.a <= 5"
|
||||
@@ -551,6 +562,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -660,6 +672,7 @@ ANALYZE
|
||||
"r_rows": 20,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"using_index_for_group_by": true
|
||||
|
||||
@@ -1 +1 @@
|
||||
--slow-query-log --long-query-time=0.00001 --log-slow-verbosity=query_plan,explain
|
||||
--slow-query-log --long-query-time=0.00001 --log-slow-verbosity=query_plan,explain,innodb
|
||||
|
||||
@@ -3875,6 +3875,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a1 is not null"
|
||||
@@ -3923,6 +3924,7 @@ ANALYZE
|
||||
"r_loops": 0,
|
||||
"rows": 1,
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": null,
|
||||
"using_index": true
|
||||
@@ -3966,6 +3968,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -4172,6 +4175,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -4195,6 +4199,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.c is not null"
|
||||
@@ -4299,6 +4304,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
|
||||
@@ -3688,3 +3688,31 @@ DROP TABLE results_alter_db;
|
||||
DROP TABLE results_create_table;
|
||||
DROP TABLE results_alter_table;
|
||||
DROP TABLE results_convert_table;
|
||||
#
|
||||
# MDEV-30003 Assertion failure upon 2nd execution of SP trying to set collation on non-existing database
|
||||
#
|
||||
CREATE PROCEDURE p() ALTER SCHEMA db DEFAULT COLLATE = utf8_bin;
|
||||
CALL p;
|
||||
ERROR HY000: Can't create/write to file '<dir>db.opt' (Errcode: 2 "No such file or directory")
|
||||
CALL p;
|
||||
ERROR HY000: Can't create/write to file '<dir>db.opt' (Errcode: 2 "No such file or directory")
|
||||
DROP PROCEDURE p;
|
||||
CREATE DATABASE db1;
|
||||
CREATE PROCEDURE p() CREATE DATABASE db1 COLLATE DEFAULT;
|
||||
CALL p;
|
||||
ERROR HY000: Can't create database 'db1'; database exists
|
||||
CALL p;
|
||||
ERROR HY000: Can't create database 'db1'; database exists
|
||||
DROP DATABASE db1;
|
||||
DROP PROCEDURE p;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE PROCEDURE p() CREATE TABLE t1 (a INT) COLLATE DEFAULT;
|
||||
CALL p;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
CALL p;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p;
|
||||
#
|
||||
# End of 10.9 tests
|
||||
#
|
||||
|
||||
@@ -366,3 +366,38 @@ DROP TABLE results_alter_db;
|
||||
DROP TABLE results_create_table;
|
||||
DROP TABLE results_alter_table;
|
||||
DROP TABLE results_convert_table;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30003 Assertion failure upon 2nd execution of SP trying to set collation on non-existing database
|
||||
--echo #
|
||||
|
||||
CREATE PROCEDURE p() ALTER SCHEMA db DEFAULT COLLATE = utf8_bin;
|
||||
--replace_regex /to file '.*db.opt'/to file '<dir>db.opt'/
|
||||
--error 1
|
||||
CALL p;
|
||||
--replace_regex /to file '.*db.opt'/to file '<dir>db.opt'/
|
||||
--error 1
|
||||
CALL p;
|
||||
DROP PROCEDURE p;
|
||||
|
||||
CREATE DATABASE db1;
|
||||
CREATE PROCEDURE p() CREATE DATABASE db1 COLLATE DEFAULT;
|
||||
--error ER_DB_CREATE_EXISTS
|
||||
CALL p;
|
||||
--error ER_DB_CREATE_EXISTS
|
||||
CALL p;
|
||||
DROP DATABASE db1;
|
||||
DROP PROCEDURE p;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE PROCEDURE p() CREATE TABLE t1 (a INT) COLLATE DEFAULT;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
CALL p;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
CALL p;
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.9 tests
|
||||
--echo #
|
||||
|
||||
@@ -19683,6 +19683,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 50,
|
||||
"attached_condition": "t1.a = 3"
|
||||
|
||||
@@ -380,6 +380,7 @@ ANALYZE
|
||||
"r_rows": 5,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -398,6 +399,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "trigcond(trigcond(t1.b is not null))"
|
||||
@@ -417,6 +419,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "trigcond(trigcond(t1.b is not null))"
|
||||
@@ -461,6 +464,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -475,6 +479,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
|
||||
@@ -94,6 +94,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -117,6 +118,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -170,6 +172,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -193,6 +196,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -358,6 +362,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -372,6 +377,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -404,6 +410,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -418,6 +425,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -481,6 +489,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -495,6 +504,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -527,6 +537,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -541,6 +552,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
|
||||
@@ -154,6 +154,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -177,6 +178,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -235,6 +237,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -258,6 +261,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -485,6 +489,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -499,6 +504,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -531,6 +537,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -545,6 +552,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -607,6 +615,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -621,6 +630,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -653,6 +663,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -667,6 +678,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
|
||||
@@ -1165,6 +1165,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"using_index_for_group_by": true
|
||||
@@ -1511,6 +1512,7 @@ ANALYZE
|
||||
"r_loops": 0,
|
||||
"rows": 1,
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": null,
|
||||
"impossible_on_condition": true
|
||||
@@ -1525,6 +1527,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -1590,6 +1593,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -1608,6 +1612,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "trigcond(t2.pk is null) and trigcond(trigcond(t1.a is not null))",
|
||||
@@ -1679,6 +1684,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a is not null"
|
||||
@@ -1698,6 +1704,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"using_index": true,
|
||||
@@ -1784,6 +1791,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t3.a is not null"
|
||||
@@ -1804,6 +1812,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"index_condition_bka": "t4.b + 1 <= t3.b + 1"
|
||||
|
||||
@@ -44,6 +44,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 30,
|
||||
"attached_condition": "t1.a in (2,3,4)"
|
||||
@@ -68,6 +69,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_filtered": 30,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"attached_condition": "t1.a in (2,3,4)"
|
||||
}
|
||||
}
|
||||
@@ -88,6 +90,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_filtered": 0,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"attached_condition": "t1.a in (20,30,40)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -147,6 +148,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -170,6 +172,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -223,6 +226,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -246,6 +250,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -269,6 +274,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -410,6 +416,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -433,6 +440,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -447,6 +455,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -509,6 +518,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -532,6 +542,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -546,6 +557,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
|
||||
@@ -136,6 +136,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -159,6 +160,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -182,6 +184,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -235,6 +238,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -258,6 +262,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -281,6 +286,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -441,6 +447,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -464,6 +471,7 @@ ANALYZE
|
||||
"r_rows": 5,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -478,6 +486,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -540,6 +549,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -563,6 +573,7 @@ ANALYZE
|
||||
"r_rows": 5,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -577,6 +588,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
|
||||
@@ -234,6 +234,7 @@ connection default;
|
||||
set debug_sync='now WAIT_FOR go0';
|
||||
set debug_sync='found_killee SIGNAL go1 WAIT_FOR go2';
|
||||
kill $id;
|
||||
select variable_value into @threads_cached from information_schema.global_status where variable_name='threads_cached';
|
||||
set debug_sync='now SIGNAL go3';
|
||||
drop table t1;
|
||||
set debug_sync='reset';
|
||||
|
||||
@@ -313,6 +313,12 @@ connection default;
|
||||
set debug_sync='now WAIT_FOR go0';
|
||||
set debug_sync='found_killee SIGNAL go1 WAIT_FOR go2';
|
||||
evalp kill $id;
|
||||
select variable_value into @threads_cached from information_schema.global_status where variable_name='threads_cached';
|
||||
set debug_sync='now SIGNAL go3';
|
||||
if (`select @@thread_handling != 'pool-of-threads'`) {
|
||||
# cannot check that a thread was added to thread pool on windows, but the test works there w/o the wait
|
||||
let wait_condition= select variable_value>@threads_cached from information_schema.global_status where variable_name='threads_cached';
|
||||
source include/wait_condition.inc;
|
||||
}
|
||||
drop table t1;
|
||||
set debug_sync='reset';
|
||||
|
||||
78
mysql-test/main/log_slow_innodb.result
Normal file
78
mysql-test/main/log_slow_innodb.result
Normal file
@@ -0,0 +1,78 @@
|
||||
CREATE TABLE t1(a INT primary key, b int) ENGINE=InnoDB;
|
||||
INSERT INTO t1 select seq, seq from seq_1_to_1000;
|
||||
SET SESSION min_examined_row_limit=0;
|
||||
SET SESSION long_query_time=0;
|
||||
SET SESSION log_slow_verbosity='innodb,query_plan';
|
||||
[slow_log_start.inc] log_slow_innodb-verbosity_1
|
||||
SELECT sum(a+b) FROM t1;
|
||||
sum(a+b)
|
||||
1001000
|
||||
UPDATE t1 set b=b+1 where a=1 or a=999;
|
||||
[log_slow_stop.inc] log_slow_innodb-verbosity_1
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Thread_id: .+ Schema: .+ QC_hit: (Yes|No)$ expected_matches: 3
|
||||
[log_grep.inc] found expected match count: 3
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Query_time: \d+\.\d+ Lock_time: \d+\.\d+ Rows_sent: \d+ Rows_examined: \d+$ expected_matches: 3
|
||||
[log_grep.inc] found expected match count: 3
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Rows_affected: \d+ Bytes_sent: \d+$ expected_matches: 3
|
||||
[log_grep.inc] found expected match count: 3
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Full_scan: (Yes|No) Full_join: (Yes|No) Tmp_table: (Yes|No) Tmp_table_on_disk: (Yes|No)$
|
||||
[log_grep.inc] lines: 1
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\ Priority_queue: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\ Priority_queue: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
SET SESSION log_slow_verbosity='innodb,query_plan';
|
||||
[slow_log_start.inc] log_slow_innodb-verbosity_2
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
[log_slow_stop.inc] log_slow_innodb-verbosity_2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Thread_id: .+ Schema: .+ QC_hit: (Yes|No)$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Query_time: \d+\.\d+ Lock_time: \d+\.\d+ Rows_sent: \d+ Rows_examined: \d+$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Rows_affected: \d+ Bytes_sent: \d+$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Full_scan: (Yes|No) Full_join: (Yes|No) Tmp_table: (Yes|No) Tmp_table_on_disk: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\ Priority_queue: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\ Priority_queue: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
SET SESSION log_slow_verbosity='query_plan';
|
||||
[log_slow_stop.inc] log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000)
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Thread_id: .+ Schema: .+ QC_hit: (Yes|No)$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Query_time: \d+\.\d+ Lock_time: \d+\.\d+ Rows_sent: \d+ Rows_examined: \d+$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Rows_affected: \d+ Bytes_sent: \d+$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Full_scan: (Yes|No) Full_join: (Yes|No) Tmp_table: (Yes|No) Tmp_table_on_disk: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\ Priority_queue: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Yes|No) Merge_passes: \d+\ Priority_queue: (Yes|No)$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
DROP TABLE t1;
|
||||
75
mysql-test/main/log_slow_innodb.test
Normal file
75
mysql-test/main/log_slow_innodb.test
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# Test the extended slow query log output format for various log_slow_verbosity values.
|
||||
# Test that InnoDB stats for the extended slow query log are collected.
|
||||
#
|
||||
# This test file is based on tests from Percona server
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/log_slow_prepare.inc
|
||||
# Cannot be used with view protocol as number of temporary tables changes
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
--let $log_slow_prefix=log_slow_innodb
|
||||
|
||||
# Force cold buffer pool
|
||||
#--let $restart_parameters=--innodb_buffer_pool_load_at_startup=OFF
|
||||
#--source include/restart_mysqld.inc
|
||||
|
||||
CREATE TABLE t1(a INT primary key, b int) ENGINE=InnoDB;
|
||||
INSERT INTO t1 select seq, seq from seq_1_to_1000;
|
||||
|
||||
SET SESSION min_examined_row_limit=0;
|
||||
SET SESSION long_query_time=0;
|
||||
|
||||
#
|
||||
# Test all enabled options with InnoDB-involving query
|
||||
#
|
||||
SET SESSION log_slow_verbosity='innodb,query_plan';
|
||||
--let log_file=$log_slow_prefix-verbosity_1
|
||||
|
||||
--source include/log_slow_start.inc
|
||||
SELECT sum(a+b) FROM t1;
|
||||
UPDATE t1 set b=b+1 where a=1 or a=999;
|
||||
--source include/log_slow_stop.inc
|
||||
|
||||
--let log_slow_verbosity_expected_matches= 3
|
||||
--let log_slow_verbosity_queryplan_matches= 1
|
||||
--let log_slow_verbosity_innodb_expected_matches= 2
|
||||
--let log_slow_verbosity_tmptable_expected_matches= 0
|
||||
--source include/log_slow_grep.inc
|
||||
|
||||
#
|
||||
# Test for "No InnoDB statistics available" in output when InnoDB stats are requested
|
||||
# but the query does not involve InnoDB tables
|
||||
#
|
||||
|
||||
SET SESSION log_slow_verbosity='innodb,query_plan';
|
||||
--let log_file=$log_slow_prefix-verbosity_2
|
||||
|
||||
--source include/log_slow_start.inc
|
||||
SELECT 1;
|
||||
--source include/log_slow_stop.inc
|
||||
|
||||
--let log_slow_verbosity_expected_matches= 2
|
||||
--let log_slow_verbosity_queryplan_matches= 1
|
||||
--let log_slow_verbosity_innodb_expected_matches= 0
|
||||
--source include/log_slow_grep.inc
|
||||
|
||||
#
|
||||
# Test 'query_plan'
|
||||
#
|
||||
|
||||
SET SESSION log_slow_verbosity='query_plan';
|
||||
let log_file=$log_slow_prefix-verbosity_3
|
||||
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000);
|
||||
--source include/log_slow_stop.inc
|
||||
|
||||
--let log_slow_verbosity_innodb_expected_matches= 1
|
||||
--source include/log_slow_grep.inc
|
||||
|
||||
DROP TABLE t1;
|
||||
--source include/log_slow_cleanup.inc
|
||||
@@ -534,7 +534,7 @@ The following specify which files/extra groups are read (specified before remain
|
||||
(Defaults to on; use --skip-log-slow-slave-statements to disable.)
|
||||
--log-slow-verbosity=name
|
||||
Verbosity level for the slow log. Any combination of:
|
||||
innodb, query_plan, explain
|
||||
innodb, query_plan, explain, engine, full
|
||||
--log-tc=name Path to transaction coordinator log (used for
|
||||
transactions that affect more than one storage engine,
|
||||
when binary log is disabled).
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_sequence.inc
|
||||
# View protocol changes some plans
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
SELECT table_name, column_name FROM information_schema.columns where table_name="OPTIMIZER_TRACE";
|
||||
set optimizer_trace="enabled=on";
|
||||
show variables like 'optimizer_trace';
|
||||
|
||||
@@ -3421,6 +3421,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -3774,6 +3775,7 @@ ANALYZE
|
||||
"r_rows": 100,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -3937,6 +3939,7 @@ ANALYZE
|
||||
"r_rows": 5,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -3983,6 +3986,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -4035,6 +4039,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -4101,6 +4106,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -4270,6 +4276,7 @@ ANALYZE
|
||||
"r_rows": 50,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -4303,6 +4310,7 @@ ANALYZE
|
||||
"r_rows": 50,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 2,
|
||||
"attached_condition": "t1.b = t2.b"
|
||||
|
||||
@@ -113,6 +113,7 @@ ANALYZE
|
||||
"r_rows": 10000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -275,6 +276,7 @@ ANALYZE
|
||||
"r_rows": 10000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -433,6 +435,7 @@ ANALYZE
|
||||
"r_rows": 10000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -486,6 +489,7 @@ ANALYZE
|
||||
"r_rows": 10000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
|
||||
@@ -39,5 +39,17 @@ t1 CREATE TABLE `t1` (
|
||||
(PARTITION `p0` VALUES LESS THAN ('a') ENGINE = MyISAM)
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-30681 SIGFPE / UBSAN runtime error: division by zero in String::needs_conversion on ALTER
|
||||
#
|
||||
CREATE TABLE t1 (a BINARY (10)) PARTITION BY LIST COLUMNS (a) (PARTITION p VALUES IN (0xFF));
|
||||
SELECT COLUMN_TYPE, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
|
||||
COLUMN_TYPE COLLATION_NAME
|
||||
binary(10) NULL
|
||||
ALTER TABLE t1 CHANGE COLUMN a a CHAR(10) BINARY;
|
||||
SELECT COLUMN_TYPE, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
|
||||
COLUMN_TYPE COLLATION_NAME
|
||||
char(10) latin1_bin
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.9 tests
|
||||
#
|
||||
|
||||
@@ -43,6 +43,17 @@ ALTER TABLE t1 CHANGE COLUMN a a CHAR BINARY;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30681 SIGFPE / UBSAN runtime error: division by zero in String::needs_conversion on ALTER
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a BINARY (10)) PARTITION BY LIST COLUMNS (a) (PARTITION p VALUES IN (0xFF));
|
||||
SELECT COLUMN_TYPE, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
|
||||
ALTER TABLE t1 CHANGE COLUMN a a CHAR(10) BINARY;
|
||||
SELECT COLUMN_TYPE, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.9 tests
|
||||
--echo #
|
||||
|
||||
@@ -144,6 +144,7 @@ ANALYZE
|
||||
"r_rows": 60,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 11.69025803,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
|
||||
@@ -275,6 +276,7 @@ ANALYZE
|
||||
"r_rows": 510,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 11.69025803,
|
||||
"r_filtered": 11.76470588,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
|
||||
@@ -438,6 +440,7 @@ ANALYZE
|
||||
"r_rows": 71,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "orders.o_totalprice between 200000 and 230000"
|
||||
@@ -475,6 +478,7 @@ ANALYZE
|
||||
"r_rows": 0.154929577,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 1.631973386,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
|
||||
@@ -586,6 +590,7 @@ ANALYZE
|
||||
"r_rows": 98,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'"
|
||||
@@ -605,6 +610,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 4.599999905,
|
||||
"r_filtered": 11.2244898,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 230000"
|
||||
@@ -752,6 +758,7 @@ ANALYZE
|
||||
"r_rows": 60,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 11.69025803,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
|
||||
@@ -785,6 +792,7 @@ ANALYZE
|
||||
"r_rows": 0.266666667,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 9.266666412,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "orders.o_totalprice between 180000 and 230000"
|
||||
@@ -909,6 +917,7 @@ ANALYZE
|
||||
"r_rows": 510,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 11.69025803,
|
||||
"r_filtered": 11.76470588,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
|
||||
@@ -929,6 +938,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 9.266666412,
|
||||
"r_filtered": 26.66666667,
|
||||
"attached_condition": "orders.o_totalprice between 180000 and 230000"
|
||||
@@ -1049,6 +1059,7 @@ ANALYZE
|
||||
"r_rows": 71,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "orders.o_totalprice between 200000 and 230000"
|
||||
@@ -1086,6 +1097,7 @@ ANALYZE
|
||||
"r_rows": 0.521126761,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 8.476269722,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
|
||||
@@ -1218,6 +1230,7 @@ ANALYZE
|
||||
"r_rows": 71,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "orders.o_totalprice between 200000 and 230000"
|
||||
@@ -1242,6 +1255,7 @@ ANALYZE
|
||||
"r_rows": 6.704225352,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 8.476269722,
|
||||
"r_filtered": 7.773109244,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
|
||||
@@ -1397,6 +1411,7 @@ ANALYZE
|
||||
"r_rows": 18,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.566194832,
|
||||
"r_filtered": 38.88888889,
|
||||
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
|
||||
@@ -1417,6 +1432,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 7.466666698,
|
||||
"r_filtered": 14.28571429,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 250000"
|
||||
@@ -1531,6 +1547,7 @@ ANALYZE
|
||||
"r_rows": 18,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.566194832,
|
||||
"r_filtered": 38.88888889,
|
||||
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
|
||||
@@ -1551,6 +1568,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 7.466666698,
|
||||
"r_filtered": 14.28571429,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 250000"
|
||||
@@ -1665,6 +1683,7 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.200000048,
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -1690,6 +1709,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.047460556,
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -1800,6 +1820,7 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.200000048,
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -1825,6 +1846,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.047460556,
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -1948,6 +1970,7 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -1973,6 +1996,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -2093,6 +2117,7 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -2118,6 +2143,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -2501,6 +2527,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 49.20000076,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "t1.nm like '500%'",
|
||||
@@ -2551,6 +2578,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 49.20000076,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "t1.nm like '500%'",
|
||||
@@ -2640,6 +2668,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 1.149999976,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.nm like '75%'"
|
||||
@@ -2751,6 +2780,7 @@ ANALYZE
|
||||
"r_rows": 0,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.439999998,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.nm like '3400%' or t1.nm like '3402%' or t1.nm like '3403%' or t1.nm like '3404%' or t1.nm like '3405%' or t1.nm like '3406%' or t1.nm like '3407%' or t1.nm like '3409%' or t1.nm like '3411%' or t1.nm like '3412%' or t1.nm like '3413%' or t1.nm like '3414%' or t1.nm like '3415%' or t1.nm like '3416%' or t1.nm like '3417%' or t1.nm like '3418%' or t1.nm like '3419%' or t1.nm like '3421%' or t1.nm like '3422%' or t1.nm like '3423%' or t1.nm like '3424%' or t1.nm like '3425%' or t1.nm like '3426%' or t1.nm like '3427%' or t1.nm like '3428%' or t1.nm like '3429%' or t1.nm like '3430%' or t1.nm like '3431%' or t1.nm like '3432%' or t1.nm like '3433%' or t1.nm like '3434%' or t1.nm like '3435%' or t1.nm like '3436%' or t1.nm like '3437%' or t1.nm like '3439%' or t1.nm like '3440%' or t1.nm like '3441%' or t1.nm like '3442%' or t1.nm like '3443%' or t1.nm like '3444%' or t1.nm like '3445%' or t1.nm like '3446%' or t1.nm like '3447%' or t1.nm like '3448%'"
|
||||
@@ -2812,6 +2842,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 853,
|
||||
"r_rows": 0,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.439999998,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.nm like '3400%' or t1.nm like '3402%' or t1.nm like '3403%' or t1.nm like '3404%' or t1.nm like '3405%' or t1.nm like '3406%' or t1.nm like '3407%' or t1.nm like '3409%' or t1.nm like '3411%' or t1.nm like '3412%' or t1.nm like '3413%' or t1.nm like '3414%' or t1.nm like '3415%' or t1.nm like '3416%' or t1.nm like '3417%' or t1.nm like '3418%' or t1.nm like '3419%' or t1.nm like '3421%' or t1.nm like '3422%' or t1.nm like '3423%' or t1.nm like '3424%' or t1.nm like '3425%' or t1.nm like '3426%' or t1.nm like '3427%' or t1.nm like '3428%' or t1.nm like '3429%' or t1.nm like '3430%' or t1.nm like '3431%' or t1.nm like '3432%' or t1.nm like '3433%' or t1.nm like '3434%' or t1.nm like '3435%' or t1.nm like '3436%' or t1.nm like '3437%' or t1.nm like '3439%' or t1.nm like '3440%' or t1.nm like '3441%' or t1.nm like '3442%' or t1.nm like '3443%' or t1.nm like '3444%' or t1.nm like '3445%' or t1.nm like '3446%' or t1.nm like '3447%' or t1.nm like '3448%'"
|
||||
|
||||
@@ -147,6 +147,7 @@ ANALYZE
|
||||
"r_rows": 60,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 10.07493782,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
|
||||
@@ -278,6 +279,7 @@ ANALYZE
|
||||
"r_rows": 510,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 10.07493782,
|
||||
"r_filtered": 11.76470588,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
|
||||
@@ -439,6 +441,7 @@ ANALYZE
|
||||
"r_rows": 98,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
|
||||
@@ -459,6 +462,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 4.733333111,
|
||||
"r_filtered": 11.2244898,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 230000"
|
||||
@@ -571,6 +575,7 @@ ANALYZE
|
||||
"r_rows": 98,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-01-31'",
|
||||
@@ -591,6 +596,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 4.733333111,
|
||||
"r_filtered": 11.2244898,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 230000"
|
||||
@@ -730,6 +736,7 @@ ANALYZE
|
||||
"r_rows": 60,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 10.07493782,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'",
|
||||
@@ -750,6 +757,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 9.600000381,
|
||||
"r_filtered": 26.66666667,
|
||||
"attached_condition": "orders.o_totalprice between 180000 and 230000"
|
||||
@@ -868,6 +876,7 @@ ANALYZE
|
||||
"r_rows": 144,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "orders.o_totalprice between 180000 and 230000",
|
||||
@@ -894,6 +903,7 @@ ANALYZE
|
||||
"r_rows": 6.625,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.855656624,
|
||||
"r_filtered": 1.677148847,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30' and lineitem.l_quantity > 45"
|
||||
@@ -1007,6 +1017,7 @@ ANALYZE
|
||||
"r_rows": 71,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 230000",
|
||||
@@ -1032,6 +1043,7 @@ ANALYZE
|
||||
"r_rows": 6.704225352,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 8.492922783,
|
||||
"r_filtered": 7.773109244,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
|
||||
@@ -1165,6 +1177,7 @@ ANALYZE
|
||||
"r_rows": 71,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 230000",
|
||||
@@ -1190,6 +1203,7 @@ ANALYZE
|
||||
"r_rows": 6.704225352,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 8.492922783,
|
||||
"r_filtered": 7.773109244,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1997-01-01' and '1997-06-30'"
|
||||
@@ -1345,6 +1359,7 @@ ANALYZE
|
||||
"r_rows": 18,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.566194832,
|
||||
"r_filtered": 38.88888889,
|
||||
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
|
||||
@@ -1365,6 +1380,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 5.666666508,
|
||||
"r_filtered": 14.28571429,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 250000"
|
||||
@@ -1479,6 +1495,7 @@ ANALYZE
|
||||
"r_rows": 18,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.566194832,
|
||||
"r_filtered": 38.88888889,
|
||||
"index_condition": "lineitem.l_receiptDATE between '1996-10-05' and '1996-10-10'",
|
||||
@@ -1499,6 +1516,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 5.666666508,
|
||||
"r_filtered": 14.28571429,
|
||||
"attached_condition": "orders.o_totalprice between 200000 and 250000"
|
||||
@@ -1613,6 +1631,7 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.333333254,
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -1638,6 +1657,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.047460556,
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -1748,6 +1768,7 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.333333254,
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -1773,6 +1794,7 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 3.047460556,
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -1896,6 +1918,9 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {
|
||||
"pages_accessed": 84
|
||||
},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -1921,6 +1946,9 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {
|
||||
"pages_accessed": 3
|
||||
},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -2041,6 +2069,9 @@ ANALYZE
|
||||
"r_rows": 41,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {
|
||||
"pages_accessed": 84
|
||||
},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 2.43902439,
|
||||
"index_condition": "orders.o_totaldiscount between 18000 and 20000",
|
||||
@@ -2066,6 +2097,9 @@ ANALYZE
|
||||
"r_rows": 6,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": {
|
||||
"pages_accessed": 3
|
||||
},
|
||||
"filtered": "REPLACED",
|
||||
"r_filtered": 66.66666667,
|
||||
"attached_condition": "lineitem.l_shipDATE between '1996-10-01' and '1996-12-01'"
|
||||
@@ -2449,6 +2483,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 49.20000076,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "t1.nm like '500%'",
|
||||
@@ -2499,6 +2534,7 @@ ANALYZE
|
||||
"r_rows": 1,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 49.20000076,
|
||||
"r_filtered": 100,
|
||||
"index_condition": "t1.nm like '500%'",
|
||||
@@ -2588,6 +2624,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 1.149999976,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.nm like '75%'"
|
||||
@@ -2699,6 +2736,7 @@ ANALYZE
|
||||
"r_rows": 0,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.439999998,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.nm like '3400%' or t1.nm like '3402%' or t1.nm like '3403%' or t1.nm like '3404%' or t1.nm like '3405%' or t1.nm like '3406%' or t1.nm like '3407%' or t1.nm like '3409%' or t1.nm like '3411%' or t1.nm like '3412%' or t1.nm like '3413%' or t1.nm like '3414%' or t1.nm like '3415%' or t1.nm like '3416%' or t1.nm like '3417%' or t1.nm like '3418%' or t1.nm like '3419%' or t1.nm like '3421%' or t1.nm like '3422%' or t1.nm like '3423%' or t1.nm like '3424%' or t1.nm like '3425%' or t1.nm like '3426%' or t1.nm like '3427%' or t1.nm like '3428%' or t1.nm like '3429%' or t1.nm like '3430%' or t1.nm like '3431%' or t1.nm like '3432%' or t1.nm like '3433%' or t1.nm like '3434%' or t1.nm like '3435%' or t1.nm like '3436%' or t1.nm like '3437%' or t1.nm like '3439%' or t1.nm like '3440%' or t1.nm like '3441%' or t1.nm like '3442%' or t1.nm like '3443%' or t1.nm like '3444%' or t1.nm like '3445%' or t1.nm like '3446%' or t1.nm like '3447%' or t1.nm like '3448%'"
|
||||
@@ -2760,6 +2798,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 853,
|
||||
"r_rows": 0,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 0.439999998,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.nm like '3400%' or t1.nm like '3402%' or t1.nm like '3403%' or t1.nm like '3404%' or t1.nm like '3405%' or t1.nm like '3406%' or t1.nm like '3407%' or t1.nm like '3409%' or t1.nm like '3411%' or t1.nm like '3412%' or t1.nm like '3413%' or t1.nm like '3414%' or t1.nm like '3415%' or t1.nm like '3416%' or t1.nm like '3417%' or t1.nm like '3418%' or t1.nm like '3419%' or t1.nm like '3421%' or t1.nm like '3422%' or t1.nm like '3423%' or t1.nm like '3424%' or t1.nm like '3425%' or t1.nm like '3426%' or t1.nm like '3427%' or t1.nm like '3428%' or t1.nm like '3429%' or t1.nm like '3430%' or t1.nm like '3431%' or t1.nm like '3432%' or t1.nm like '3433%' or t1.nm like '3434%' or t1.nm like '3435%' or t1.nm like '3436%' or t1.nm like '3437%' or t1.nm like '3439%' or t1.nm like '3440%' or t1.nm like '3441%' or t1.nm like '3442%' or t1.nm like '3443%' or t1.nm like '3444%' or t1.nm like '3445%' or t1.nm like '3446%' or t1.nm like '3447%' or t1.nm like '3448%'"
|
||||
@@ -3862,6 +3901,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t.tp = 121 and t.rid = 'B5FCC8C7111E4E3CBC21AAF5012F59C2'",
|
||||
@@ -3883,6 +3923,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
},
|
||||
@@ -3913,6 +3954,7 @@ ANALYZE
|
||||
"r_rows": 80,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 14.46428585,
|
||||
"r_filtered": 100
|
||||
},
|
||||
|
||||
@@ -423,6 +423,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ SHOW ANALYZE
|
||||
"r_rows": 1000,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 99.90000153,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a < 10"
|
||||
@@ -293,6 +294,7 @@ SHOW ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 60,
|
||||
"attached_condition": "a.a <= 5"
|
||||
@@ -313,6 +315,7 @@ SHOW ANALYZE
|
||||
"r_loops": 0,
|
||||
"rows": 10,
|
||||
"r_rows": null,
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": null,
|
||||
"attached_condition": "b.a >= 9"
|
||||
@@ -362,6 +365,7 @@ SHOW ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 60,
|
||||
"attached_condition": "a.a <= 5"
|
||||
@@ -386,6 +390,7 @@ SHOW ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 10,
|
||||
"attached_condition": "b.a >= 9"
|
||||
@@ -486,6 +491,7 @@ SHOW ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 20,
|
||||
"attached_condition": "a.a < 2"
|
||||
@@ -508,6 +514,7 @@ SHOW ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 30,
|
||||
"attached_condition": "b.a > 6"
|
||||
@@ -669,6 +676,7 @@ SHOW ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 20,
|
||||
"attached_condition": "a.a < 2"
|
||||
@@ -694,6 +702,7 @@ SHOW ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 95,
|
||||
"attached_condition": "b.a + a.a < 10"
|
||||
|
||||
42
mysql-test/main/sp-memory-leak.result
Normal file
42
mysql-test/main/sp-memory-leak.result
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# MDEV-30680 Warning: Memory not freed: 280 on mangled query, LeakSanitizer: detected memory leaks
|
||||
#
|
||||
BEGIN NOT ATOMIC
|
||||
IF SCALAR() expected_THEN_here;
|
||||
END
|
||||
$$
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'expected_THEN_here;
|
||||
END' at line 2
|
||||
BEGIN NOT ATOMIC
|
||||
WHILE SCALAR() expected_DO_here;
|
||||
END
|
||||
$$
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'expected_DO_here;
|
||||
END' at line 2
|
||||
BEGIN NOT ATOMIC
|
||||
REPEAT SELECT 1; UNTIL SCALAR() expected_END_here;
|
||||
END
|
||||
$$
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'expected_END_here;
|
||||
END' at line 2
|
||||
#
|
||||
# MDEV-31578 DECLARE CURSOR: "Memory not freed: 280 bytes lost" on syntax error
|
||||
#
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE cur CURSOR (a INT) FOR SELECT a+1;
|
||||
OPEN cur(sp_followed_by_syntax_error();
|
||||
CLOSE cur;
|
||||
END;
|
||||
$$
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ';
|
||||
CLOSE cur;
|
||||
END' at line 3
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE cur CURSOR (a INT) FOR SELECT a+1;
|
||||
OPEN cur(1,sp_followed_by_syntax_error();
|
||||
CLOSE cur;
|
||||
END;
|
||||
$$
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ';
|
||||
CLOSE cur;
|
||||
END' at line 3
|
||||
54
mysql-test/main/sp-memory-leak.test
Normal file
54
mysql-test/main/sp-memory-leak.test
Normal file
@@ -0,0 +1,54 @@
|
||||
--echo #
|
||||
--echo # MDEV-30680 Warning: Memory not freed: 280 on mangled query, LeakSanitizer: detected memory leaks
|
||||
--echo #
|
||||
|
||||
DELIMITER $$;
|
||||
--error ER_PARSE_ERROR
|
||||
BEGIN NOT ATOMIC
|
||||
IF SCALAR() expected_THEN_here;
|
||||
END
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
|
||||
DELIMITER $$;
|
||||
--error ER_PARSE_ERROR
|
||||
BEGIN NOT ATOMIC
|
||||
WHILE SCALAR() expected_DO_here;
|
||||
END
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
|
||||
DELIMITER $$;
|
||||
--error ER_PARSE_ERROR
|
||||
BEGIN NOT ATOMIC
|
||||
REPEAT SELECT 1; UNTIL SCALAR() expected_END_here;
|
||||
END
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31578 DECLARE CURSOR: "Memory not freed: 280 bytes lost" on syntax error
|
||||
--echo #
|
||||
|
||||
DELIMITER $$;
|
||||
--error ER_PARSE_ERROR
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE cur CURSOR (a INT) FOR SELECT a+1;
|
||||
OPEN cur(sp_followed_by_syntax_error();
|
||||
CLOSE cur;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
DELIMITER $$;
|
||||
--error ER_PARSE_ERROR
|
||||
BEGIN NOT ATOMIC
|
||||
DECLARE cur CURSOR (a INT) FOR SELECT a+1;
|
||||
OPEN cur(1,sp_followed_by_syntax_error();
|
||||
CLOSE cur;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
@@ -2933,6 +2933,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -2957,6 +2958,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 50,
|
||||
"attached_condition": "<nop>(<in_optimizer>(t1.b,(subquery#3) >= 4))"
|
||||
@@ -2979,6 +2981,7 @@ ANALYZE
|
||||
"r_rows": 2,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -82,6 +83,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 18.75,
|
||||
"attached_condition": "t1.b = t2.c"
|
||||
@@ -112,6 +114,7 @@ ANALYZE
|
||||
"r_rows": 10,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
@@ -144,6 +147,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 18.75,
|
||||
"attached_condition": "t1.b = t2.c"
|
||||
@@ -184,6 +188,7 @@ ANALYZE
|
||||
"r_rows": 4,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 18.75,
|
||||
"attached_condition": "t1.b = t2.c"
|
||||
@@ -1698,7 +1703,7 @@ Subquery_cache_miss 18
|
||||
show status like '%Handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 32
|
||||
Handler_read_key 29
|
||||
Handler_read_last 0
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
@@ -1763,7 +1768,7 @@ Subquery_cache_miss 10
|
||||
show status like '%Handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 13
|
||||
Handler_read_key 12
|
||||
Handler_read_last 0
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
|
||||
@@ -159,5 +159,23 @@ def j 250 (format=json) 9437283 16 Y 0 39 33
|
||||
j
|
||||
{"a": {"b":"c"}}
|
||||
#
|
||||
# MDEV-26506 Over-quoted JSON when combining JSON_ARRAYAGG with JSON_OBJECT
|
||||
#
|
||||
# maintain JSON property through internal temporary tables
|
||||
create table t1 (a varchar(30));
|
||||
insert into t1 values ('root');
|
||||
select json_object('attr2',o) from (select a, json_arrayagg(json_object('attr1', a)) as o from t1) u;
|
||||
json_object('attr2',o)
|
||||
{"attr2": [{"attr1": "root"}]}
|
||||
drop table t1;
|
||||
create view v1 as select json_object(_latin1 'a', _latin1'b') as v1_json;
|
||||
select v1_json from v1;
|
||||
v1_json
|
||||
{"a": "b"}
|
||||
select json_arrayagg(v1_json) from v1;
|
||||
json_arrayagg(v1_json)
|
||||
[{"a": "b"}]
|
||||
drop view v1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
||||
@@ -121,6 +121,20 @@ SELECT json_object('a', (SELECT json_objectagg(b, c) FROM (SELECT 'b','c') d)) A
|
||||
--disable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26506 Over-quoted JSON when combining JSON_ARRAYAGG with JSON_OBJECT
|
||||
--echo #
|
||||
--echo # maintain JSON property through internal temporary tables
|
||||
create table t1 (a varchar(30));
|
||||
insert into t1 values ('root');
|
||||
select json_object('attr2',o) from (select a, json_arrayagg(json_object('attr1', a)) as o from t1) u;
|
||||
drop table t1;
|
||||
|
||||
create view v1 as select json_object(_latin1 'a', _latin1'b') as v1_json;
|
||||
select v1_json from v1;
|
||||
select json_arrayagg(v1_json) from v1;
|
||||
drop view v1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
||||
@@ -3851,6 +3851,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
|
||||
@@ -439,3 +439,10 @@ NULL
|
||||
NULL
|
||||
2021-01-24
|
||||
drop table t1,t2;
|
||||
set @local.sql_mode=@sql_mode;
|
||||
#
|
||||
# MDEV-29152: Assertion failed ... upon TO_CHAR with wrong argument
|
||||
#
|
||||
SELECT TO_CHAR((VALUES('2022-12-12','2020-10-10')));
|
||||
ERROR HY000: Illegal parameter data type row for operation 'to_char'
|
||||
SELECT TO_CHAR((STR_TO_DATE('2023-01-01', '%d-%m-%Y'), 'YYYY-MM-DD') );
|
||||
|
||||
@@ -224,3 +224,13 @@ select * from t2;
|
||||
drop table t1,t2;
|
||||
set @local.sql_mode=@sql_mode;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-29152: Assertion failed ... upon TO_CHAR with wrong argument
|
||||
--echo #
|
||||
|
||||
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
|
||||
SELECT TO_CHAR((VALUES('2022-12-12','2020-10-10')));
|
||||
|
||||
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
|
||||
SELECT TO_CHAR((STR_TO_DATE('2023-01-01', '%d-%m-%Y'), 'YYYY-MM-DD') );
|
||||
|
||||
|
||||
@@ -3857,6 +3857,7 @@ ANALYZE
|
||||
"r_rows": 3,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
|
||||
@@ -237,6 +237,7 @@ ANALYZE
|
||||
"r_rows": 7,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 100,
|
||||
"r_filtered": 100
|
||||
}
|
||||
|
||||
40
mysql-test/suite/innodb/r/innodb_row_lock_time_ms.result
Normal file
40
mysql-test/suite/innodb/r/innodb_row_lock_time_ms.result
Normal file
@@ -0,0 +1,40 @@
|
||||
CREATE TABLE `t`(`id` INT, PRIMARY KEY(`id`)) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
INSERT INTO t VALUES (1);
|
||||
SET GLOBAL innodb_monitor_reset = "module_innodb";
|
||||
BEGIN;
|
||||
SELECT * FROM t FOR UPDATE;
|
||||
id
|
||||
1
|
||||
connect con1,localhost,root,,;
|
||||
SET innodb_lock_wait_timeout = 1;
|
||||
SELECT * FROM t FOR UPDATE;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
disconnect con1;
|
||||
connection default;
|
||||
COMMIT;
|
||||
SELECT variable_value > 100 FROM information_schema.global_status
|
||||
WHERE LOWER(variable_name) = 'innodb_row_lock_time';
|
||||
variable_value > 100
|
||||
1
|
||||
SELECT variable_value > 100 FROM information_schema.global_status
|
||||
WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
|
||||
variable_value > 100
|
||||
1
|
||||
SELECT variable_value > 100 FROM information_schema.global_status
|
||||
WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
|
||||
variable_value > 100
|
||||
1
|
||||
SELECT count_reset > 100 FROM INFORMATION_SCHEMA.INNODB_METRICS
|
||||
WHERE NAME="lock_row_lock_time";
|
||||
count_reset > 100
|
||||
1
|
||||
SELECT count_reset > 100 FROM INFORMATION_SCHEMA.INNODB_METRICS
|
||||
WHERE NAME="lock_row_lock_time_max";
|
||||
count_reset > 100
|
||||
1
|
||||
SELECT count_reset > 100 FROM INFORMATION_SCHEMA.INNODB_METRICS
|
||||
WHERE NAME="lock_row_lock_time_avg";
|
||||
count_reset > 100
|
||||
1
|
||||
DROP TABLE t;
|
||||
SET GLOBAL innodb_monitor_reset=default;
|
||||
42
mysql-test/suite/innodb/t/innodb_row_lock_time_ms.test
Normal file
42
mysql-test/suite/innodb/t/innodb_row_lock_time_ms.test
Normal file
@@ -0,0 +1,42 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
CREATE TABLE `t`(`id` INT, PRIMARY KEY(`id`)) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
|
||||
INSERT INTO t VALUES (1);
|
||||
|
||||
SET GLOBAL innodb_monitor_reset = "module_innodb";
|
||||
|
||||
BEGIN;
|
||||
SELECT * FROM t FOR UPDATE;
|
||||
|
||||
--connect(con1,localhost,root,,)
|
||||
SET innodb_lock_wait_timeout = 1;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
SELECT * FROM t FOR UPDATE;
|
||||
--disconnect con1
|
||||
|
||||
--connection default
|
||||
COMMIT;
|
||||
|
||||
SELECT variable_value > 100 FROM information_schema.global_status
|
||||
WHERE LOWER(variable_name) = 'innodb_row_lock_time';
|
||||
SELECT variable_value > 100 FROM information_schema.global_status
|
||||
WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
|
||||
SELECT variable_value > 100 FROM information_schema.global_status
|
||||
WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
|
||||
|
||||
SELECT count_reset > 100 FROM INFORMATION_SCHEMA.INNODB_METRICS
|
||||
WHERE NAME="lock_row_lock_time";
|
||||
SELECT count_reset > 100 FROM INFORMATION_SCHEMA.INNODB_METRICS
|
||||
WHERE NAME="lock_row_lock_time_max";
|
||||
SELECT count_reset > 100 FROM INFORMATION_SCHEMA.INNODB_METRICS
|
||||
WHERE NAME="lock_row_lock_time_avg";
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_monitor_reset=default;
|
||||
--enable_warnings
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
||||
@@ -591,11 +591,11 @@ print OUT pack("x[470]N", 0x677700cf);
|
||||
# invalid (all-zero) checkpoint page 1 and an empty log page
|
||||
print OUT chr(0) x 1024;
|
||||
# valid checkpoint block 2
|
||||
print OUT pack("x[12]NNNx[264]", 0x12860c, 0, 0x80c);
|
||||
print OUT pack("x[12]NNNx[264]", 0x12860c, 0, 0x120c);
|
||||
# pointer to the FILE_CHECKPOINT record, and checkpoint page checksum
|
||||
print OUT pack("H*x[204]NNN", "590DBAACFE922582", 0x128612, 0, 0x101741b);
|
||||
print OUT pack("H*x[204]NNN", "590DBAACFE922582", 0x128612, 0, 0x3b4ce62d);
|
||||
# log page
|
||||
print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2);
|
||||
print OUT pack("x[2560]NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2);
|
||||
close OUT or die;
|
||||
EOF
|
||||
|
||||
|
||||
@@ -67,10 +67,10 @@ set session log_slow_verbosity='explain';
|
||||
select @@session.log_slow_verbosity;
|
||||
@@session.log_slow_verbosity
|
||||
explain
|
||||
set session log_slow_verbosity='innodb,query_plan,explain';
|
||||
set session log_slow_verbosity='innodb,query_plan,explain,engine,full';
|
||||
select @@session.log_slow_verbosity;
|
||||
@@session.log_slow_verbosity
|
||||
innodb,query_plan,explain
|
||||
innodb,query_plan,explain,engine,full
|
||||
set session log_slow_verbosity='';
|
||||
select @@session.log_slow_verbosity;
|
||||
@@session.log_slow_verbosity
|
||||
@@ -81,6 +81,6 @@ set session log_slow_verbosity=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'log_slow_verbosity'
|
||||
set session log_slow_verbosity="foo";
|
||||
ERROR 42000: Variable 'log_slow_verbosity' can't be set to the value of 'foo'
|
||||
set session log_slow_verbosity=8;
|
||||
ERROR 42000: Variable 'log_slow_verbosity' can't be set to the value of '8'
|
||||
set session log_slow_verbosity=32;
|
||||
ERROR 42000: Variable 'log_slow_verbosity' can't be set to the value of '32'
|
||||
SET @@global.log_slow_verbosity = @start_global_value;
|
||||
|
||||
@@ -1729,7 +1729,7 @@ VARIABLE_COMMENT Verbosity level for the slow log
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST innodb,query_plan,explain
|
||||
ENUM_VALUE_LIST innodb,query_plan,explain,engine,full
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME LOG_WARNINGS
|
||||
|
||||
@@ -1879,7 +1879,7 @@ VARIABLE_COMMENT Verbosity level for the slow log
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST innodb,query_plan,explain
|
||||
ENUM_VALUE_LIST innodb,query_plan,explain,engine,full
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME LOG_WARNINGS
|
||||
|
||||
@@ -47,7 +47,7 @@ set session log_slow_verbosity='innodb,query_plan';
|
||||
select @@session.log_slow_verbosity;
|
||||
set session log_slow_verbosity='explain';
|
||||
select @@session.log_slow_verbosity;
|
||||
set session log_slow_verbosity='innodb,query_plan,explain';
|
||||
set session log_slow_verbosity='innodb,query_plan,explain,engine,full';
|
||||
select @@session.log_slow_verbosity;
|
||||
set session log_slow_verbosity='';
|
||||
select @@session.log_slow_verbosity;
|
||||
@@ -62,6 +62,6 @@ set session log_slow_verbosity=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set session log_slow_verbosity="foo";
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set session log_slow_verbosity=8;
|
||||
set session log_slow_verbosity=32;
|
||||
|
||||
SET @@global.log_slow_verbosity = @start_global_value;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <m_string.h>
|
||||
#include <signal.h>
|
||||
|
||||
pthread_key(struct st_my_thread_var*, THR_KEY_mysys);
|
||||
pthread_key(struct st_my_thread_var*, THR_KEY_mysys=-1);
|
||||
mysql_mutex_t THR_LOCK_malloc, THR_LOCK_open,
|
||||
THR_LOCK_lock, THR_LOCK_myisam, THR_LOCK_heap,
|
||||
THR_LOCK_net, THR_LOCK_charset, THR_LOCK_threads,
|
||||
|
||||
@@ -151,14 +151,14 @@ String *Item_func_inet6_aton::val_str(String *buffer)
|
||||
if ((null_value= tmp.is_null()))
|
||||
return NULL;
|
||||
|
||||
Inet4Bundle::Fbt_null ipv4(*tmp.string());
|
||||
Type_handler_inet4::Fbt_null ipv4(*tmp.string());
|
||||
if (!ipv4.is_null())
|
||||
{
|
||||
ipv4.to_binary(buffer);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
Inet6Bundle::Fbt_null ipv6(*tmp.string());
|
||||
Type_handler_inet6::Fbt_null ipv6(*tmp.string());
|
||||
if (!ipv6.is_null())
|
||||
{
|
||||
ipv6.to_binary(buffer);
|
||||
@@ -190,14 +190,14 @@ String *Item_func_inet6_ntoa::val_str_ascii(String *buffer)
|
||||
if ((null_value= tmp.is_null()))
|
||||
return NULL;
|
||||
|
||||
Inet4Bundle::Fbt_null ipv4(static_cast<const Binary_string&>(*tmp.string()));
|
||||
Type_handler_inet4::Fbt_null ipv4(static_cast<const Binary_string&>(*tmp.string()));
|
||||
if (!ipv4.is_null())
|
||||
{
|
||||
ipv4.to_string(buffer);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
Inet6Bundle::Fbt_null ipv6(static_cast<const Binary_string&>(*tmp.string()));
|
||||
Type_handler_inet6::Fbt_null ipv6(static_cast<const Binary_string&>(*tmp.string()));
|
||||
if (!ipv6.is_null())
|
||||
{
|
||||
ipv6.to_string(buffer);
|
||||
@@ -218,13 +218,13 @@ longlong Item_func_is_ipv4::val_int()
|
||||
{
|
||||
DBUG_ASSERT(fixed());
|
||||
String_ptr_and_buffer<STRING_BUFFER_USUAL_SIZE> tmp(args[0]);
|
||||
return !tmp.is_null() && !Inet4Bundle::Fbt_null(*tmp.string()).is_null();
|
||||
return !tmp.is_null() && !Type_handler_inet4::Fbt_null(*tmp.string()).is_null();
|
||||
}
|
||||
|
||||
class IP6 : public Inet6Bundle::Fbt_null
|
||||
class IP6 : public Type_handler_inet6::Fbt_null
|
||||
{
|
||||
public:
|
||||
IP6(Item* arg) : Inet6Bundle::Fbt_null(arg) {}
|
||||
IP6(Item* arg) : Type_handler_inet6::Fbt_null(arg) {}
|
||||
bool is_v4compat() const
|
||||
{
|
||||
static_assert(sizeof(in6_addr) == IN6_ADDR_SIZE, "unexpected in6_addr size");
|
||||
@@ -246,7 +246,7 @@ longlong Item_func_is_ipv6::val_int()
|
||||
{
|
||||
DBUG_ASSERT(fixed());
|
||||
String_ptr_and_buffer<STRING_BUFFER_USUAL_SIZE> tmp(args[0]);
|
||||
return !tmp.is_null() && !Inet6Bundle::Fbt_null(*tmp.string()).is_null();
|
||||
return !tmp.is_null() && !Type_handler_inet6::Fbt_null(*tmp.string()).is_null();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
static struct st_mariadb_data_type plugin_descriptor_type_inet4=
|
||||
{
|
||||
MariaDB_DATA_TYPE_INTERFACE_VERSION,
|
||||
Inet4Bundle::type_handler_fbt()
|
||||
Type_handler_inet4::singleton()
|
||||
};
|
||||
|
||||
|
||||
static struct st_mariadb_data_type plugin_descriptor_type_inet6=
|
||||
{
|
||||
MariaDB_DATA_TYPE_INTERFACE_VERSION,
|
||||
Inet6Bundle::type_handler_fbt()
|
||||
Type_handler_inet6::singleton()
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -259,9 +259,9 @@ bool Inet6::ascii_to_fbt(const char *str, size_t str_length)
|
||||
return true;
|
||||
}
|
||||
|
||||
Inet4Bundle::Fbt_null tmp(group_start_ptr,
|
||||
(size_t) (str_end - group_start_ptr),
|
||||
&my_charset_latin1);
|
||||
Type_handler_inet4::Fbt_null tmp(group_start_ptr,
|
||||
(size_t) (str_end - group_start_ptr),
|
||||
&my_charset_latin1);
|
||||
if (tmp.is_null())
|
||||
{
|
||||
DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
|
||||
#include "sql_type_fixedbin.h"
|
||||
typedef FixedBinTypeBundle<Inet6> Inet6Bundle;
|
||||
typedef Type_handler_fbt<Inet6> Type_handler_inet6;
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
static const Name &default_value();
|
||||
};
|
||||
|
||||
typedef FixedBinTypeBundle<Inet4> Inet4Bundle;
|
||||
typedef Type_handler_fbt<Inet4> Type_handler_inet4;
|
||||
|
||||
|
||||
#endif /* SQL_TYPE_INET_H */
|
||||
|
||||
@@ -188,13 +188,6 @@ public:
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
if (type_handler_mysql_json.name().eq(name))
|
||||
return &type_handler_mysql_json;
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
const Type_collection *Type_handler_mysql_json::type_collection() const
|
||||
|
||||
@@ -26,11 +26,6 @@ protected:
|
||||
const Type_handler *aggregate_common(const Type_handler *h1,
|
||||
const Type_handler *h2) const;
|
||||
public:
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const Type_handler *aggregate_for_result(const Type_handler *h1,
|
||||
const Type_handler *h2)
|
||||
const override
|
||||
|
||||
@@ -26,10 +26,6 @@ protected:
|
||||
const Type_handler *aggregate_common(const Type_handler *h1,
|
||||
const Type_handler *h2) const;
|
||||
public:
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const Type_handler *aggregate_for_result(const Type_handler *h1,
|
||||
const Type_handler *h2)
|
||||
const override;
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
|
||||
MYSQL_ADD_PLUGIN(type_uuid
|
||||
plugin.cc sql_type_uuid.cc item_uuidfunc.cc
|
||||
plugin.cc item_uuidfunc.cc
|
||||
MANDATORY RECOMPILE_FOR_EMBEDDED)
|
||||
|
||||
@@ -33,7 +33,7 @@ String *Item_func_sys_guid::val_str(String *str)
|
||||
|
||||
const Type_handler *Item_func_uuid::type_handler() const
|
||||
{
|
||||
return UUIDBundle::type_handler_fbt();
|
||||
return Type_handler_uuid_new::singleton();
|
||||
}
|
||||
|
||||
bool Item_func_uuid::val_native(THD *, Native *to)
|
||||
|
||||
768
plugin/type_uuid/mysql-test/type_uuid/order.result
Normal file
768
plugin/type_uuid/mysql-test/type_uuid/order.result
Normal file
@@ -0,0 +1,768 @@
|
||||
create table t1 (a uuid, b int not null, index (a));
|
||||
insert t1 select sformat('11223344-5566-{:x}777-{}888-99aabbccddee', seq div 4, elt(1+(seq % 4),0,8,'c','e')),seq from seq_0_to_63;
|
||||
Warnings:
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 33
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 37
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 41
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 45
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 49
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 53
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 57
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-f777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 61
|
||||
select * from t1;
|
||||
a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31
|
||||
NULL 32
|
||||
11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35
|
||||
NULL 36
|
||||
11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39
|
||||
NULL 40
|
||||
11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43
|
||||
NULL 44
|
||||
11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47
|
||||
NULL 48
|
||||
11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51
|
||||
NULL 52
|
||||
11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55
|
||||
NULL 56
|
||||
11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59
|
||||
NULL 60
|
||||
11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63
|
||||
select * from t1 order by a;
|
||||
a b
|
||||
NULL 40
|
||||
NULL 32
|
||||
NULL 36
|
||||
NULL 44
|
||||
NULL 48
|
||||
NULL 52
|
||||
NULL 56
|
||||
NULL 60
|
||||
11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63
|
||||
11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-e888-99aabbccddee 23
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` uuid DEFAULT NULL,
|
||||
`b` int(11) NOT NULL,
|
||||
KEY `a` (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
# now let's use the table as above, but created in 10.11.4
|
||||
select * from t2;
|
||||
a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-0888-99aabbccddee 32
|
||||
11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-0888-99aabbccddee 36
|
||||
11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-0888-99aabbccddee 40
|
||||
11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-0888-99aabbccddee 44
|
||||
11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-0888-99aabbccddee 48
|
||||
11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-0888-99aabbccddee 52
|
||||
11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-0888-99aabbccddee 56
|
||||
11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-0888-99aabbccddee 60
|
||||
11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63
|
||||
select * from t2 order by a;
|
||||
a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-8777-0888-99aabbccddee 32
|
||||
11223344-5566-9777-0888-99aabbccddee 36
|
||||
11223344-5566-a777-0888-99aabbccddee 40
|
||||
11223344-5566-b777-0888-99aabbccddee 44
|
||||
11223344-5566-c777-0888-99aabbccddee 48
|
||||
11223344-5566-d777-0888-99aabbccddee 52
|
||||
11223344-5566-e777-0888-99aabbccddee 56
|
||||
11223344-5566-f777-0888-99aabbccddee 60
|
||||
11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-e888-99aabbccddee 63
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` uuid DEFAULT NULL,
|
||||
`b` int(11) NOT NULL,
|
||||
KEY `a` (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
explain select * from t1 left join t2 on (t1.a=t2.a);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 64
|
||||
1 SIMPLE t2 ref a a 17 test.t1.a 1 Using where
|
||||
select * from t1 left join t2 on (t1.a=t2.a);
|
||||
a b a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0 11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-0777-8888-99aabbccddee 1 11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-0777-c888-99aabbccddee 2 11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-0777-e888-99aabbccddee 3 11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-0888-99aabbccddee 4 11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-1777-8888-99aabbccddee 5 11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-1777-c888-99aabbccddee 6 11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-1777-e888-99aabbccddee 7 11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-0888-99aabbccddee 8 11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-2777-8888-99aabbccddee 9 11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-2777-c888-99aabbccddee 10 11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-2777-e888-99aabbccddee 11 11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-0888-99aabbccddee 12 11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-3777-8888-99aabbccddee 13 11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-3777-c888-99aabbccddee 14 11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-3777-e888-99aabbccddee 15 11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-0888-99aabbccddee 16 11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-4777-8888-99aabbccddee 17 11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-4777-c888-99aabbccddee 18 11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-4777-e888-99aabbccddee 19 11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-0888-99aabbccddee 20 11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-5777-8888-99aabbccddee 21 11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-5777-c888-99aabbccddee 22 11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-5777-e888-99aabbccddee 23 11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-0888-99aabbccddee 24 11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25 11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26 11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27 11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28 11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29 11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30 11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31 11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-8888-99aabbccddee 33 11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34 11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35 11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-8888-99aabbccddee 37 11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38 11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39 11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-8888-99aabbccddee 41 11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42 11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43 11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-8888-99aabbccddee 45 11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46 11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47 11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-8888-99aabbccddee 49 11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50 11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51 11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-8888-99aabbccddee 53 11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54 11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55 11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-8888-99aabbccddee 57 11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58 11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59 11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-8888-99aabbccddee 61 11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62 11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63 11223344-5566-f777-e888-99aabbccddee 63
|
||||
NULL 32 NULL NULL
|
||||
NULL 36 NULL NULL
|
||||
NULL 40 NULL NULL
|
||||
NULL 44 NULL NULL
|
||||
NULL 48 NULL NULL
|
||||
NULL 52 NULL NULL
|
||||
NULL 56 NULL NULL
|
||||
NULL 60 NULL NULL
|
||||
explain select * from t1 left join t2 on (t1.a<=>t2.a);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 64
|
||||
1 SIMPLE t2 ref a a 17 test.t1.a 1 Using where
|
||||
select * from t1 left join t2 on (t1.a<=>t2.a);
|
||||
a b a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0 11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-0777-8888-99aabbccddee 1 11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-0777-c888-99aabbccddee 2 11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-0777-e888-99aabbccddee 3 11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-0888-99aabbccddee 4 11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-1777-8888-99aabbccddee 5 11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-1777-c888-99aabbccddee 6 11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-1777-e888-99aabbccddee 7 11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-0888-99aabbccddee 8 11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-2777-8888-99aabbccddee 9 11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-2777-c888-99aabbccddee 10 11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-2777-e888-99aabbccddee 11 11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-0888-99aabbccddee 12 11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-3777-8888-99aabbccddee 13 11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-3777-c888-99aabbccddee 14 11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-3777-e888-99aabbccddee 15 11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-0888-99aabbccddee 16 11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-4777-8888-99aabbccddee 17 11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-4777-c888-99aabbccddee 18 11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-4777-e888-99aabbccddee 19 11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-0888-99aabbccddee 20 11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-5777-8888-99aabbccddee 21 11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-5777-c888-99aabbccddee 22 11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-5777-e888-99aabbccddee 23 11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-0888-99aabbccddee 24 11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25 11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26 11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27 11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28 11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29 11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30 11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31 11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-8888-99aabbccddee 33 11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34 11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35 11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-8888-99aabbccddee 37 11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38 11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39 11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-8888-99aabbccddee 41 11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42 11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43 11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-8888-99aabbccddee 45 11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46 11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47 11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-8888-99aabbccddee 49 11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50 11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51 11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-8888-99aabbccddee 53 11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54 11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55 11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-8888-99aabbccddee 57 11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58 11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59 11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-8888-99aabbccddee 61 11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62 11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63 11223344-5566-f777-e888-99aabbccddee 63
|
||||
NULL 32 NULL NULL
|
||||
NULL 36 NULL NULL
|
||||
NULL 40 NULL NULL
|
||||
NULL 44 NULL NULL
|
||||
NULL 48 NULL NULL
|
||||
NULL 52 NULL NULL
|
||||
NULL 56 NULL NULL
|
||||
NULL 60 NULL NULL
|
||||
explain select * from t2 left join t1 on (t1.a=t2.a);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 64
|
||||
1 SIMPLE t1 ref a a 17 test.t2.a 1 Using where
|
||||
select * from t2 left join t1 on (t1.a=t2.a);
|
||||
a b a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0 11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-0777-8888-99aabbccddee 1 11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-0777-c888-99aabbccddee 2 11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-0777-e888-99aabbccddee 3 11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-0888-99aabbccddee 4 11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-1777-8888-99aabbccddee 5 11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-1777-c888-99aabbccddee 6 11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-1777-e888-99aabbccddee 7 11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-0888-99aabbccddee 8 11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-2777-8888-99aabbccddee 9 11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-2777-c888-99aabbccddee 10 11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-2777-e888-99aabbccddee 11 11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-0888-99aabbccddee 12 11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-3777-8888-99aabbccddee 13 11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-3777-c888-99aabbccddee 14 11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-3777-e888-99aabbccddee 15 11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-0888-99aabbccddee 16 11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-4777-8888-99aabbccddee 17 11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-4777-c888-99aabbccddee 18 11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-4777-e888-99aabbccddee 19 11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-0888-99aabbccddee 20 11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-5777-8888-99aabbccddee 21 11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-5777-c888-99aabbccddee 22 11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-5777-e888-99aabbccddee 23 11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-0888-99aabbccddee 24 11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25 11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26 11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27 11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28 11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29 11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30 11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31 11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL NULL
|
||||
11223344-5566-8777-8888-99aabbccddee 33 11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34 11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35 11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL NULL
|
||||
11223344-5566-9777-8888-99aabbccddee 37 11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38 11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39 11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL NULL
|
||||
11223344-5566-a777-8888-99aabbccddee 41 11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42 11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43 11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL NULL
|
||||
11223344-5566-b777-8888-99aabbccddee 45 11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46 11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47 11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL NULL
|
||||
11223344-5566-c777-8888-99aabbccddee 49 11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50 11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51 11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL NULL
|
||||
11223344-5566-d777-8888-99aabbccddee 53 11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54 11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55 11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL NULL
|
||||
11223344-5566-e777-8888-99aabbccddee 57 11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58 11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59 11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL NULL
|
||||
11223344-5566-f777-8888-99aabbccddee 61 11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62 11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63 11223344-5566-f777-e888-99aabbccddee 63
|
||||
explain select * from t2 left join t1 on (t1.a<=>t2.a);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 64
|
||||
1 SIMPLE t1 ref a a 17 test.t2.a 1 Using where
|
||||
select * from t2 left join t1 on (t1.a<=>t2.a);
|
||||
a b a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0 11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-0777-8888-99aabbccddee 1 11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-0777-c888-99aabbccddee 2 11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-0777-e888-99aabbccddee 3 11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-0888-99aabbccddee 4 11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-1777-8888-99aabbccddee 5 11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-1777-c888-99aabbccddee 6 11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-1777-e888-99aabbccddee 7 11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-0888-99aabbccddee 8 11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-2777-8888-99aabbccddee 9 11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-2777-c888-99aabbccddee 10 11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-2777-e888-99aabbccddee 11 11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-0888-99aabbccddee 12 11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-3777-8888-99aabbccddee 13 11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-3777-c888-99aabbccddee 14 11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-3777-e888-99aabbccddee 15 11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-0888-99aabbccddee 16 11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-4777-8888-99aabbccddee 17 11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-4777-c888-99aabbccddee 18 11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-4777-e888-99aabbccddee 19 11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-0888-99aabbccddee 20 11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-5777-8888-99aabbccddee 21 11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-5777-c888-99aabbccddee 22 11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-5777-e888-99aabbccddee 23 11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-0888-99aabbccddee 24 11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25 11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26 11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27 11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28 11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29 11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30 11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31 11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 32
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 36
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 40
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 44
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 48
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 52
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 56
|
||||
11223344-5566-8777-0888-99aabbccddee 32 NULL 60
|
||||
11223344-5566-8777-8888-99aabbccddee 33 11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34 11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35 11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 32
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 36
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 40
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 44
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 48
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 52
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 56
|
||||
11223344-5566-9777-0888-99aabbccddee 36 NULL 60
|
||||
11223344-5566-9777-8888-99aabbccddee 37 11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38 11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39 11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 32
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 36
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 40
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 44
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 48
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 52
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 56
|
||||
11223344-5566-a777-0888-99aabbccddee 40 NULL 60
|
||||
11223344-5566-a777-8888-99aabbccddee 41 11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42 11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43 11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 32
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 36
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 40
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 44
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 48
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 52
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 56
|
||||
11223344-5566-b777-0888-99aabbccddee 44 NULL 60
|
||||
11223344-5566-b777-8888-99aabbccddee 45 11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46 11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47 11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 32
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 36
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 40
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 44
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 48
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 52
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 56
|
||||
11223344-5566-c777-0888-99aabbccddee 48 NULL 60
|
||||
11223344-5566-c777-8888-99aabbccddee 49 11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50 11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51 11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 32
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 36
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 40
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 44
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 48
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 52
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 56
|
||||
11223344-5566-d777-0888-99aabbccddee 52 NULL 60
|
||||
11223344-5566-d777-8888-99aabbccddee 53 11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54 11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55 11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 32
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 36
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 40
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 44
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 48
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 52
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 56
|
||||
11223344-5566-e777-0888-99aabbccddee 56 NULL 60
|
||||
11223344-5566-e777-8888-99aabbccddee 57 11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58 11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59 11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 32
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 36
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 40
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 44
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 48
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 52
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 56
|
||||
11223344-5566-f777-0888-99aabbccddee 60 NULL 60
|
||||
11223344-5566-f777-8888-99aabbccddee 61 11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62 11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63 11223344-5566-f777-e888-99aabbccddee 63
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee'
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-f777-0888-99aabbccddee'
|
||||
Warnings:
|
||||
select * from t1 union select * from t2;
|
||||
a b
|
||||
11223344-5566-0777-0888-99aabbccddee 0
|
||||
11223344-5566-0777-8888-99aabbccddee 1
|
||||
11223344-5566-0777-c888-99aabbccddee 2
|
||||
11223344-5566-0777-e888-99aabbccddee 3
|
||||
11223344-5566-1777-0888-99aabbccddee 4
|
||||
11223344-5566-1777-8888-99aabbccddee 5
|
||||
11223344-5566-1777-c888-99aabbccddee 6
|
||||
11223344-5566-1777-e888-99aabbccddee 7
|
||||
11223344-5566-2777-0888-99aabbccddee 8
|
||||
11223344-5566-2777-8888-99aabbccddee 9
|
||||
11223344-5566-2777-c888-99aabbccddee 10
|
||||
11223344-5566-2777-e888-99aabbccddee 11
|
||||
11223344-5566-3777-0888-99aabbccddee 12
|
||||
11223344-5566-3777-8888-99aabbccddee 13
|
||||
11223344-5566-3777-c888-99aabbccddee 14
|
||||
11223344-5566-3777-e888-99aabbccddee 15
|
||||
11223344-5566-4777-0888-99aabbccddee 16
|
||||
11223344-5566-4777-8888-99aabbccddee 17
|
||||
11223344-5566-4777-c888-99aabbccddee 18
|
||||
11223344-5566-4777-e888-99aabbccddee 19
|
||||
11223344-5566-5777-0888-99aabbccddee 20
|
||||
11223344-5566-5777-8888-99aabbccddee 21
|
||||
11223344-5566-5777-c888-99aabbccddee 22
|
||||
11223344-5566-5777-e888-99aabbccddee 23
|
||||
11223344-5566-6777-0888-99aabbccddee 24
|
||||
11223344-5566-6777-8888-99aabbccddee 25
|
||||
11223344-5566-6777-c888-99aabbccddee 26
|
||||
11223344-5566-6777-e888-99aabbccddee 27
|
||||
11223344-5566-7777-0888-99aabbccddee 28
|
||||
11223344-5566-7777-8888-99aabbccddee 29
|
||||
11223344-5566-7777-c888-99aabbccddee 30
|
||||
11223344-5566-7777-e888-99aabbccddee 31
|
||||
11223344-5566-8777-8888-99aabbccddee 33
|
||||
11223344-5566-8777-c888-99aabbccddee 34
|
||||
11223344-5566-8777-e888-99aabbccddee 35
|
||||
11223344-5566-9777-8888-99aabbccddee 37
|
||||
11223344-5566-9777-c888-99aabbccddee 38
|
||||
11223344-5566-9777-e888-99aabbccddee 39
|
||||
11223344-5566-a777-8888-99aabbccddee 41
|
||||
11223344-5566-a777-c888-99aabbccddee 42
|
||||
11223344-5566-a777-e888-99aabbccddee 43
|
||||
11223344-5566-b777-8888-99aabbccddee 45
|
||||
11223344-5566-b777-c888-99aabbccddee 46
|
||||
11223344-5566-b777-e888-99aabbccddee 47
|
||||
11223344-5566-c777-8888-99aabbccddee 49
|
||||
11223344-5566-c777-c888-99aabbccddee 50
|
||||
11223344-5566-c777-e888-99aabbccddee 51
|
||||
11223344-5566-d777-8888-99aabbccddee 53
|
||||
11223344-5566-d777-c888-99aabbccddee 54
|
||||
11223344-5566-d777-e888-99aabbccddee 55
|
||||
11223344-5566-e777-8888-99aabbccddee 57
|
||||
11223344-5566-e777-c888-99aabbccddee 58
|
||||
11223344-5566-e777-e888-99aabbccddee 59
|
||||
11223344-5566-f777-8888-99aabbccddee 61
|
||||
11223344-5566-f777-c888-99aabbccddee 62
|
||||
11223344-5566-f777-e888-99aabbccddee 63
|
||||
NULL 32
|
||||
NULL 36
|
||||
NULL 40
|
||||
NULL 44
|
||||
NULL 48
|
||||
NULL 52
|
||||
NULL 56
|
||||
NULL 60
|
||||
alter ignore table t2 force;
|
||||
Warnings:
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-8777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 33
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-9777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 37
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-a777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 41
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-b777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 45
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-c777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 49
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-d777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 53
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-e777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 57
|
||||
Warning 1292 Incorrect uuid value: '11223344-5566-f777-0888-99aabbccddee' for column `test`.`t2`.`a` at row 61
|
||||
drop table t1, t2;
|
||||
40
plugin/type_uuid/mysql-test/type_uuid/order.test
Normal file
40
plugin/type_uuid/mysql-test/type_uuid/order.test
Normal file
@@ -0,0 +1,40 @@
|
||||
# try all combinations of version and variant
|
||||
source include/have_sequence.inc;
|
||||
|
||||
create table t1 (a uuid, b int not null, index (a));
|
||||
insert t1 select sformat('11223344-5566-{:x}777-{}888-99aabbccddee', seq div 4, elt(1+(seq % 4),0,8,'c','e')),seq from seq_0_to_63;
|
||||
select * from t1;
|
||||
select * from t1 order by a;
|
||||
show create table t1;
|
||||
|
||||
--echo # now let's use the table as above, but created in 10.11.4
|
||||
let $datadir= `select @@datadir`;
|
||||
--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.frm $datadir/test/t2.frm
|
||||
--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYI $datadir/test/t2.MYI
|
||||
--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYD $datadir/test/t2.MYD
|
||||
select * from t2;
|
||||
select * from t2 order by a;
|
||||
show create table t2;
|
||||
|
||||
explain select * from t1 left join t2 on (t1.a=t2.a);
|
||||
--sorted_result
|
||||
select * from t1 left join t2 on (t1.a=t2.a);
|
||||
|
||||
explain select * from t1 left join t2 on (t1.a<=>t2.a);
|
||||
--sorted_result
|
||||
select * from t1 left join t2 on (t1.a<=>t2.a);
|
||||
|
||||
explain select * from t2 left join t1 on (t1.a=t2.a);
|
||||
--sorted_result
|
||||
select * from t2 left join t1 on (t1.a=t2.a);
|
||||
|
||||
explain select * from t2 left join t1 on (t1.a<=>t2.a);
|
||||
--sorted_result
|
||||
select * from t2 left join t1 on (t1.a<=>t2.a);
|
||||
|
||||
--sorted_result
|
||||
select * from t1 union select * from t2;
|
||||
|
||||
alter ignore table t2 force;
|
||||
|
||||
drop table t1, t2;
|
||||
BIN
plugin/type_uuid/mysql-test/type_uuid/std_data/mdev-29959.MYD
Normal file
BIN
plugin/type_uuid/mysql-test/type_uuid/std_data/mdev-29959.MYD
Normal file
Binary file not shown.
BIN
plugin/type_uuid/mysql-test/type_uuid/std_data/mdev-29959.MYI
Normal file
BIN
plugin/type_uuid/mysql-test/type_uuid/std_data/mdev-29959.MYI
Normal file
Binary file not shown.
BIN
plugin/type_uuid/mysql-test/type_uuid/std_data/mdev-29959.frm
Normal file
BIN
plugin/type_uuid/mysql-test/type_uuid/std_data/mdev-29959.frm
Normal file
Binary file not shown.
@@ -413,156 +413,6 @@ a
|
||||
00000000-0000-0000-0000-000000000000
|
||||
00000000-0000-0000-0000-000000000000
|
||||
00000000-0000-0000-0000-000000000000
|
||||
00000001-0000-0000-0000-000000000000
|
||||
00000002-0000-0000-0000-000000000000
|
||||
00000003-0000-0000-0000-000000000000
|
||||
00000004-0000-0000-0000-000000000000
|
||||
00000005-0000-0000-0000-000000000000
|
||||
00000006-0000-0000-0000-000000000000
|
||||
00000007-0000-0000-0000-000000000000
|
||||
00000008-0000-0000-0000-000000000000
|
||||
00000009-0000-0000-0000-000000000000
|
||||
0000000a-0000-0000-0000-000000000000
|
||||
0000000b-0000-0000-0000-000000000000
|
||||
0000000c-0000-0000-0000-000000000000
|
||||
0000000d-0000-0000-0000-000000000000
|
||||
0000000e-0000-0000-0000-000000000000
|
||||
0000000f-0000-0000-0000-000000000000
|
||||
00000100-0000-0000-0000-000000000000
|
||||
00000200-0000-0000-0000-000000000000
|
||||
00000300-0000-0000-0000-000000000000
|
||||
00000400-0000-0000-0000-000000000000
|
||||
00000500-0000-0000-0000-000000000000
|
||||
00000600-0000-0000-0000-000000000000
|
||||
00000700-0000-0000-0000-000000000000
|
||||
00000800-0000-0000-0000-000000000000
|
||||
00000900-0000-0000-0000-000000000000
|
||||
00000a00-0000-0000-0000-000000000000
|
||||
00000b00-0000-0000-0000-000000000000
|
||||
00000c00-0000-0000-0000-000000000000
|
||||
00000d00-0000-0000-0000-000000000000
|
||||
00000e00-0000-0000-0000-000000000000
|
||||
00000f00-0000-0000-0000-000000000000
|
||||
00010000-0000-0000-0000-000000000000
|
||||
00020000-0000-0000-0000-000000000000
|
||||
00030000-0000-0000-0000-000000000000
|
||||
00040000-0000-0000-0000-000000000000
|
||||
00050000-0000-0000-0000-000000000000
|
||||
00060000-0000-0000-0000-000000000000
|
||||
00070000-0000-0000-0000-000000000000
|
||||
00080000-0000-0000-0000-000000000000
|
||||
00090000-0000-0000-0000-000000000000
|
||||
000a0000-0000-0000-0000-000000000000
|
||||
000b0000-0000-0000-0000-000000000000
|
||||
000c0000-0000-0000-0000-000000000000
|
||||
000d0000-0000-0000-0000-000000000000
|
||||
000e0000-0000-0000-0000-000000000000
|
||||
000f0000-0000-0000-0000-000000000000
|
||||
01000000-0000-0000-0000-000000000000
|
||||
02000000-0000-0000-0000-000000000000
|
||||
03000000-0000-0000-0000-000000000000
|
||||
04000000-0000-0000-0000-000000000000
|
||||
05000000-0000-0000-0000-000000000000
|
||||
06000000-0000-0000-0000-000000000000
|
||||
07000000-0000-0000-0000-000000000000
|
||||
08000000-0000-0000-0000-000000000000
|
||||
09000000-0000-0000-0000-000000000000
|
||||
0a000000-0000-0000-0000-000000000000
|
||||
0b000000-0000-0000-0000-000000000000
|
||||
0c000000-0000-0000-0000-000000000000
|
||||
0d000000-0000-0000-0000-000000000000
|
||||
0e000000-0000-0000-0000-000000000000
|
||||
0f000000-0000-0000-0000-000000000000
|
||||
00000000-0001-0000-0000-000000000000
|
||||
00000000-0002-0000-0000-000000000000
|
||||
00000000-0003-0000-0000-000000000000
|
||||
00000000-0004-0000-0000-000000000000
|
||||
00000000-0005-0000-0000-000000000000
|
||||
00000000-0006-0000-0000-000000000000
|
||||
00000000-0007-0000-0000-000000000000
|
||||
00000000-0008-0000-0000-000000000000
|
||||
00000000-0009-0000-0000-000000000000
|
||||
00000000-000a-0000-0000-000000000000
|
||||
00000000-000b-0000-0000-000000000000
|
||||
00000000-000c-0000-0000-000000000000
|
||||
00000000-000d-0000-0000-000000000000
|
||||
00000000-000e-0000-0000-000000000000
|
||||
00000000-000f-0000-0000-000000000000
|
||||
00000000-0100-0000-0000-000000000000
|
||||
00000000-0200-0000-0000-000000000000
|
||||
00000000-0300-0000-0000-000000000000
|
||||
00000000-0400-0000-0000-000000000000
|
||||
00000000-0500-0000-0000-000000000000
|
||||
00000000-0600-0000-0000-000000000000
|
||||
00000000-0700-0000-0000-000000000000
|
||||
00000000-0800-0000-0000-000000000000
|
||||
00000000-0900-0000-0000-000000000000
|
||||
00000000-0a00-0000-0000-000000000000
|
||||
00000000-0b00-0000-0000-000000000000
|
||||
00000000-0c00-0000-0000-000000000000
|
||||
00000000-0d00-0000-0000-000000000000
|
||||
00000000-0e00-0000-0000-000000000000
|
||||
00000000-0f00-0000-0000-000000000000
|
||||
00000000-0000-0001-0000-000000000000
|
||||
00000000-0000-0002-0000-000000000000
|
||||
00000000-0000-0003-0000-000000000000
|
||||
00000000-0000-0004-0000-000000000000
|
||||
00000000-0000-0005-0000-000000000000
|
||||
00000000-0000-0006-0000-000000000000
|
||||
00000000-0000-0007-0000-000000000000
|
||||
00000000-0000-0008-0000-000000000000
|
||||
00000000-0000-0009-0000-000000000000
|
||||
00000000-0000-000a-0000-000000000000
|
||||
00000000-0000-000b-0000-000000000000
|
||||
00000000-0000-000c-0000-000000000000
|
||||
00000000-0000-000d-0000-000000000000
|
||||
00000000-0000-000e-0000-000000000000
|
||||
00000000-0000-000f-0000-000000000000
|
||||
00000000-0000-0100-0000-000000000000
|
||||
00000000-0000-0200-0000-000000000000
|
||||
00000000-0000-0300-0000-000000000000
|
||||
00000000-0000-0400-0000-000000000000
|
||||
00000000-0000-0500-0000-000000000000
|
||||
00000000-0000-0600-0000-000000000000
|
||||
00000000-0000-0700-0000-000000000000
|
||||
00000000-0000-0800-0000-000000000000
|
||||
00000000-0000-0900-0000-000000000000
|
||||
00000000-0000-0a00-0000-000000000000
|
||||
00000000-0000-0b00-0000-000000000000
|
||||
00000000-0000-0c00-0000-000000000000
|
||||
00000000-0000-0d00-0000-000000000000
|
||||
00000000-0000-0e00-0000-000000000000
|
||||
00000000-0000-0f00-0000-000000000000
|
||||
00000000-0000-0000-0001-000000000000
|
||||
00000000-0000-0000-0002-000000000000
|
||||
00000000-0000-0000-0003-000000000000
|
||||
00000000-0000-0000-0004-000000000000
|
||||
00000000-0000-0000-0005-000000000000
|
||||
00000000-0000-0000-0006-000000000000
|
||||
00000000-0000-0000-0007-000000000000
|
||||
00000000-0000-0000-0008-000000000000
|
||||
00000000-0000-0000-0009-000000000000
|
||||
00000000-0000-0000-000a-000000000000
|
||||
00000000-0000-0000-000b-000000000000
|
||||
00000000-0000-0000-000c-000000000000
|
||||
00000000-0000-0000-000d-000000000000
|
||||
00000000-0000-0000-000e-000000000000
|
||||
00000000-0000-0000-000f-000000000000
|
||||
00000000-0000-0000-0100-000000000000
|
||||
00000000-0000-0000-0200-000000000000
|
||||
00000000-0000-0000-0300-000000000000
|
||||
00000000-0000-0000-0400-000000000000
|
||||
00000000-0000-0000-0500-000000000000
|
||||
00000000-0000-0000-0600-000000000000
|
||||
00000000-0000-0000-0700-000000000000
|
||||
00000000-0000-0000-0800-000000000000
|
||||
00000000-0000-0000-0900-000000000000
|
||||
00000000-0000-0000-0a00-000000000000
|
||||
00000000-0000-0000-0b00-000000000000
|
||||
00000000-0000-0000-0c00-000000000000
|
||||
00000000-0000-0000-0d00-000000000000
|
||||
00000000-0000-0000-0e00-000000000000
|
||||
00000000-0000-0000-0f00-000000000000
|
||||
00000000-0000-0000-0000-000000000001
|
||||
00000000-0000-0000-0000-000000000002
|
||||
00000000-0000-0000-0000-000000000003
|
||||
@@ -653,6 +503,156 @@ a
|
||||
00000000-0000-0000-0000-0d0000000000
|
||||
00000000-0000-0000-0000-0e0000000000
|
||||
00000000-0000-0000-0000-0f0000000000
|
||||
00000000-0000-0000-0001-000000000000
|
||||
00000000-0000-0000-0002-000000000000
|
||||
00000000-0000-0000-0003-000000000000
|
||||
00000000-0000-0000-0004-000000000000
|
||||
00000000-0000-0000-0005-000000000000
|
||||
00000000-0000-0000-0006-000000000000
|
||||
00000000-0000-0000-0007-000000000000
|
||||
00000000-0000-0000-0008-000000000000
|
||||
00000000-0000-0000-0009-000000000000
|
||||
00000000-0000-0000-000a-000000000000
|
||||
00000000-0000-0000-000b-000000000000
|
||||
00000000-0000-0000-000c-000000000000
|
||||
00000000-0000-0000-000d-000000000000
|
||||
00000000-0000-0000-000e-000000000000
|
||||
00000000-0000-0000-000f-000000000000
|
||||
00000000-0000-0000-0100-000000000000
|
||||
00000000-0000-0000-0200-000000000000
|
||||
00000000-0000-0000-0300-000000000000
|
||||
00000000-0000-0000-0400-000000000000
|
||||
00000000-0000-0000-0500-000000000000
|
||||
00000000-0000-0000-0600-000000000000
|
||||
00000000-0000-0000-0700-000000000000
|
||||
00000000-0000-0000-0800-000000000000
|
||||
00000000-0000-0000-0900-000000000000
|
||||
00000000-0000-0000-0a00-000000000000
|
||||
00000000-0000-0000-0b00-000000000000
|
||||
00000000-0000-0000-0c00-000000000000
|
||||
00000000-0000-0000-0d00-000000000000
|
||||
00000000-0000-0000-0e00-000000000000
|
||||
00000000-0000-0000-0f00-000000000000
|
||||
00000000-0000-0001-0000-000000000000
|
||||
00000000-0000-0002-0000-000000000000
|
||||
00000000-0000-0003-0000-000000000000
|
||||
00000000-0000-0004-0000-000000000000
|
||||
00000000-0000-0005-0000-000000000000
|
||||
00000000-0000-0006-0000-000000000000
|
||||
00000000-0000-0007-0000-000000000000
|
||||
00000000-0000-0008-0000-000000000000
|
||||
00000000-0000-0009-0000-000000000000
|
||||
00000000-0000-000a-0000-000000000000
|
||||
00000000-0000-000b-0000-000000000000
|
||||
00000000-0000-000c-0000-000000000000
|
||||
00000000-0000-000d-0000-000000000000
|
||||
00000000-0000-000e-0000-000000000000
|
||||
00000000-0000-000f-0000-000000000000
|
||||
00000000-0000-0100-0000-000000000000
|
||||
00000000-0000-0200-0000-000000000000
|
||||
00000000-0000-0300-0000-000000000000
|
||||
00000000-0000-0400-0000-000000000000
|
||||
00000000-0000-0500-0000-000000000000
|
||||
00000000-0000-0600-0000-000000000000
|
||||
00000000-0000-0700-0000-000000000000
|
||||
00000000-0000-0800-0000-000000000000
|
||||
00000000-0000-0900-0000-000000000000
|
||||
00000000-0000-0a00-0000-000000000000
|
||||
00000000-0000-0b00-0000-000000000000
|
||||
00000000-0000-0c00-0000-000000000000
|
||||
00000000-0000-0d00-0000-000000000000
|
||||
00000000-0000-0e00-0000-000000000000
|
||||
00000000-0000-0f00-0000-000000000000
|
||||
00000000-0001-0000-0000-000000000000
|
||||
00000000-0002-0000-0000-000000000000
|
||||
00000000-0003-0000-0000-000000000000
|
||||
00000000-0004-0000-0000-000000000000
|
||||
00000000-0005-0000-0000-000000000000
|
||||
00000000-0006-0000-0000-000000000000
|
||||
00000000-0007-0000-0000-000000000000
|
||||
00000000-0008-0000-0000-000000000000
|
||||
00000000-0009-0000-0000-000000000000
|
||||
00000000-000a-0000-0000-000000000000
|
||||
00000000-000b-0000-0000-000000000000
|
||||
00000000-000c-0000-0000-000000000000
|
||||
00000000-000d-0000-0000-000000000000
|
||||
00000000-000e-0000-0000-000000000000
|
||||
00000000-000f-0000-0000-000000000000
|
||||
00000000-0100-0000-0000-000000000000
|
||||
00000000-0200-0000-0000-000000000000
|
||||
00000000-0300-0000-0000-000000000000
|
||||
00000000-0400-0000-0000-000000000000
|
||||
00000000-0500-0000-0000-000000000000
|
||||
00000000-0600-0000-0000-000000000000
|
||||
00000000-0700-0000-0000-000000000000
|
||||
00000000-0800-0000-0000-000000000000
|
||||
00000000-0900-0000-0000-000000000000
|
||||
00000000-0a00-0000-0000-000000000000
|
||||
00000000-0b00-0000-0000-000000000000
|
||||
00000000-0c00-0000-0000-000000000000
|
||||
00000000-0d00-0000-0000-000000000000
|
||||
00000000-0e00-0000-0000-000000000000
|
||||
00000000-0f00-0000-0000-000000000000
|
||||
00000001-0000-0000-0000-000000000000
|
||||
00000002-0000-0000-0000-000000000000
|
||||
00000003-0000-0000-0000-000000000000
|
||||
00000004-0000-0000-0000-000000000000
|
||||
00000005-0000-0000-0000-000000000000
|
||||
00000006-0000-0000-0000-000000000000
|
||||
00000007-0000-0000-0000-000000000000
|
||||
00000008-0000-0000-0000-000000000000
|
||||
00000009-0000-0000-0000-000000000000
|
||||
0000000a-0000-0000-0000-000000000000
|
||||
0000000b-0000-0000-0000-000000000000
|
||||
0000000c-0000-0000-0000-000000000000
|
||||
0000000d-0000-0000-0000-000000000000
|
||||
0000000e-0000-0000-0000-000000000000
|
||||
0000000f-0000-0000-0000-000000000000
|
||||
00000100-0000-0000-0000-000000000000
|
||||
00000200-0000-0000-0000-000000000000
|
||||
00000300-0000-0000-0000-000000000000
|
||||
00000400-0000-0000-0000-000000000000
|
||||
00000500-0000-0000-0000-000000000000
|
||||
00000600-0000-0000-0000-000000000000
|
||||
00000700-0000-0000-0000-000000000000
|
||||
00000800-0000-0000-0000-000000000000
|
||||
00000900-0000-0000-0000-000000000000
|
||||
00000a00-0000-0000-0000-000000000000
|
||||
00000b00-0000-0000-0000-000000000000
|
||||
00000c00-0000-0000-0000-000000000000
|
||||
00000d00-0000-0000-0000-000000000000
|
||||
00000e00-0000-0000-0000-000000000000
|
||||
00000f00-0000-0000-0000-000000000000
|
||||
00010000-0000-0000-0000-000000000000
|
||||
00020000-0000-0000-0000-000000000000
|
||||
00030000-0000-0000-0000-000000000000
|
||||
00040000-0000-0000-0000-000000000000
|
||||
00050000-0000-0000-0000-000000000000
|
||||
00060000-0000-0000-0000-000000000000
|
||||
00070000-0000-0000-0000-000000000000
|
||||
00080000-0000-0000-0000-000000000000
|
||||
00090000-0000-0000-0000-000000000000
|
||||
000a0000-0000-0000-0000-000000000000
|
||||
000b0000-0000-0000-0000-000000000000
|
||||
000c0000-0000-0000-0000-000000000000
|
||||
000d0000-0000-0000-0000-000000000000
|
||||
000e0000-0000-0000-0000-000000000000
|
||||
000f0000-0000-0000-0000-000000000000
|
||||
01000000-0000-0000-0000-000000000000
|
||||
02000000-0000-0000-0000-000000000000
|
||||
03000000-0000-0000-0000-000000000000
|
||||
04000000-0000-0000-0000-000000000000
|
||||
05000000-0000-0000-0000-000000000000
|
||||
06000000-0000-0000-0000-000000000000
|
||||
07000000-0000-0000-0000-000000000000
|
||||
08000000-0000-0000-0000-000000000000
|
||||
09000000-0000-0000-0000-000000000000
|
||||
0a000000-0000-0000-0000-000000000000
|
||||
0b000000-0000-0000-0000-000000000000
|
||||
0c000000-0000-0000-0000-000000000000
|
||||
0d000000-0000-0000-0000-000000000000
|
||||
0e000000-0000-0000-0000-000000000000
|
||||
0f000000-0000-0000-0000-000000000000
|
||||
SELECT COALESCE(NULL, a) FROM t1 ORDER BY a;
|
||||
COALESCE(NULL, a)
|
||||
00000000-0000-0000-0000-000000000000
|
||||
@@ -671,156 +671,6 @@ COALESCE(NULL, a)
|
||||
00000000-0000-0000-0000-000000000000
|
||||
00000000-0000-0000-0000-000000000000
|
||||
00000000-0000-0000-0000-000000000000
|
||||
00000001-0000-0000-0000-000000000000
|
||||
00000002-0000-0000-0000-000000000000
|
||||
00000003-0000-0000-0000-000000000000
|
||||
00000004-0000-0000-0000-000000000000
|
||||
00000005-0000-0000-0000-000000000000
|
||||
00000006-0000-0000-0000-000000000000
|
||||
00000007-0000-0000-0000-000000000000
|
||||
00000008-0000-0000-0000-000000000000
|
||||
00000009-0000-0000-0000-000000000000
|
||||
0000000a-0000-0000-0000-000000000000
|
||||
0000000b-0000-0000-0000-000000000000
|
||||
0000000c-0000-0000-0000-000000000000
|
||||
0000000d-0000-0000-0000-000000000000
|
||||
0000000e-0000-0000-0000-000000000000
|
||||
0000000f-0000-0000-0000-000000000000
|
||||
00000100-0000-0000-0000-000000000000
|
||||
00000200-0000-0000-0000-000000000000
|
||||
00000300-0000-0000-0000-000000000000
|
||||
00000400-0000-0000-0000-000000000000
|
||||
00000500-0000-0000-0000-000000000000
|
||||
00000600-0000-0000-0000-000000000000
|
||||
00000700-0000-0000-0000-000000000000
|
||||
00000800-0000-0000-0000-000000000000
|
||||
00000900-0000-0000-0000-000000000000
|
||||
00000a00-0000-0000-0000-000000000000
|
||||
00000b00-0000-0000-0000-000000000000
|
||||
00000c00-0000-0000-0000-000000000000
|
||||
00000d00-0000-0000-0000-000000000000
|
||||
00000e00-0000-0000-0000-000000000000
|
||||
00000f00-0000-0000-0000-000000000000
|
||||
00010000-0000-0000-0000-000000000000
|
||||
00020000-0000-0000-0000-000000000000
|
||||
00030000-0000-0000-0000-000000000000
|
||||
00040000-0000-0000-0000-000000000000
|
||||
00050000-0000-0000-0000-000000000000
|
||||
00060000-0000-0000-0000-000000000000
|
||||
00070000-0000-0000-0000-000000000000
|
||||
00080000-0000-0000-0000-000000000000
|
||||
00090000-0000-0000-0000-000000000000
|
||||
000a0000-0000-0000-0000-000000000000
|
||||
000b0000-0000-0000-0000-000000000000
|
||||
000c0000-0000-0000-0000-000000000000
|
||||
000d0000-0000-0000-0000-000000000000
|
||||
000e0000-0000-0000-0000-000000000000
|
||||
000f0000-0000-0000-0000-000000000000
|
||||
01000000-0000-0000-0000-000000000000
|
||||
02000000-0000-0000-0000-000000000000
|
||||
03000000-0000-0000-0000-000000000000
|
||||
04000000-0000-0000-0000-000000000000
|
||||
05000000-0000-0000-0000-000000000000
|
||||
06000000-0000-0000-0000-000000000000
|
||||
07000000-0000-0000-0000-000000000000
|
||||
08000000-0000-0000-0000-000000000000
|
||||
09000000-0000-0000-0000-000000000000
|
||||
0a000000-0000-0000-0000-000000000000
|
||||
0b000000-0000-0000-0000-000000000000
|
||||
0c000000-0000-0000-0000-000000000000
|
||||
0d000000-0000-0000-0000-000000000000
|
||||
0e000000-0000-0000-0000-000000000000
|
||||
0f000000-0000-0000-0000-000000000000
|
||||
00000000-0001-0000-0000-000000000000
|
||||
00000000-0002-0000-0000-000000000000
|
||||
00000000-0003-0000-0000-000000000000
|
||||
00000000-0004-0000-0000-000000000000
|
||||
00000000-0005-0000-0000-000000000000
|
||||
00000000-0006-0000-0000-000000000000
|
||||
00000000-0007-0000-0000-000000000000
|
||||
00000000-0008-0000-0000-000000000000
|
||||
00000000-0009-0000-0000-000000000000
|
||||
00000000-000a-0000-0000-000000000000
|
||||
00000000-000b-0000-0000-000000000000
|
||||
00000000-000c-0000-0000-000000000000
|
||||
00000000-000d-0000-0000-000000000000
|
||||
00000000-000e-0000-0000-000000000000
|
||||
00000000-000f-0000-0000-000000000000
|
||||
00000000-0100-0000-0000-000000000000
|
||||
00000000-0200-0000-0000-000000000000
|
||||
00000000-0300-0000-0000-000000000000
|
||||
00000000-0400-0000-0000-000000000000
|
||||
00000000-0500-0000-0000-000000000000
|
||||
00000000-0600-0000-0000-000000000000
|
||||
00000000-0700-0000-0000-000000000000
|
||||
00000000-0800-0000-0000-000000000000
|
||||
00000000-0900-0000-0000-000000000000
|
||||
00000000-0a00-0000-0000-000000000000
|
||||
00000000-0b00-0000-0000-000000000000
|
||||
00000000-0c00-0000-0000-000000000000
|
||||
00000000-0d00-0000-0000-000000000000
|
||||
00000000-0e00-0000-0000-000000000000
|
||||
00000000-0f00-0000-0000-000000000000
|
||||
00000000-0000-0001-0000-000000000000
|
||||
00000000-0000-0002-0000-000000000000
|
||||
00000000-0000-0003-0000-000000000000
|
||||
00000000-0000-0004-0000-000000000000
|
||||
00000000-0000-0005-0000-000000000000
|
||||
00000000-0000-0006-0000-000000000000
|
||||
00000000-0000-0007-0000-000000000000
|
||||
00000000-0000-0008-0000-000000000000
|
||||
00000000-0000-0009-0000-000000000000
|
||||
00000000-0000-000a-0000-000000000000
|
||||
00000000-0000-000b-0000-000000000000
|
||||
00000000-0000-000c-0000-000000000000
|
||||
00000000-0000-000d-0000-000000000000
|
||||
00000000-0000-000e-0000-000000000000
|
||||
00000000-0000-000f-0000-000000000000
|
||||
00000000-0000-0100-0000-000000000000
|
||||
00000000-0000-0200-0000-000000000000
|
||||
00000000-0000-0300-0000-000000000000
|
||||
00000000-0000-0400-0000-000000000000
|
||||
00000000-0000-0500-0000-000000000000
|
||||
00000000-0000-0600-0000-000000000000
|
||||
00000000-0000-0700-0000-000000000000
|
||||
00000000-0000-0800-0000-000000000000
|
||||
00000000-0000-0900-0000-000000000000
|
||||
00000000-0000-0a00-0000-000000000000
|
||||
00000000-0000-0b00-0000-000000000000
|
||||
00000000-0000-0c00-0000-000000000000
|
||||
00000000-0000-0d00-0000-000000000000
|
||||
00000000-0000-0e00-0000-000000000000
|
||||
00000000-0000-0f00-0000-000000000000
|
||||
00000000-0000-0000-0001-000000000000
|
||||
00000000-0000-0000-0002-000000000000
|
||||
00000000-0000-0000-0003-000000000000
|
||||
00000000-0000-0000-0004-000000000000
|
||||
00000000-0000-0000-0005-000000000000
|
||||
00000000-0000-0000-0006-000000000000
|
||||
00000000-0000-0000-0007-000000000000
|
||||
00000000-0000-0000-0008-000000000000
|
||||
00000000-0000-0000-0009-000000000000
|
||||
00000000-0000-0000-000a-000000000000
|
||||
00000000-0000-0000-000b-000000000000
|
||||
00000000-0000-0000-000c-000000000000
|
||||
00000000-0000-0000-000d-000000000000
|
||||
00000000-0000-0000-000e-000000000000
|
||||
00000000-0000-0000-000f-000000000000
|
||||
00000000-0000-0000-0100-000000000000
|
||||
00000000-0000-0000-0200-000000000000
|
||||
00000000-0000-0000-0300-000000000000
|
||||
00000000-0000-0000-0400-000000000000
|
||||
00000000-0000-0000-0500-000000000000
|
||||
00000000-0000-0000-0600-000000000000
|
||||
00000000-0000-0000-0700-000000000000
|
||||
00000000-0000-0000-0800-000000000000
|
||||
00000000-0000-0000-0900-000000000000
|
||||
00000000-0000-0000-0a00-000000000000
|
||||
00000000-0000-0000-0b00-000000000000
|
||||
00000000-0000-0000-0c00-000000000000
|
||||
00000000-0000-0000-0d00-000000000000
|
||||
00000000-0000-0000-0e00-000000000000
|
||||
00000000-0000-0000-0f00-000000000000
|
||||
00000000-0000-0000-0000-000000000001
|
||||
00000000-0000-0000-0000-000000000002
|
||||
00000000-0000-0000-0000-000000000003
|
||||
@@ -911,6 +761,156 @@ COALESCE(NULL, a)
|
||||
00000000-0000-0000-0000-0d0000000000
|
||||
00000000-0000-0000-0000-0e0000000000
|
||||
00000000-0000-0000-0000-0f0000000000
|
||||
00000000-0000-0000-0001-000000000000
|
||||
00000000-0000-0000-0002-000000000000
|
||||
00000000-0000-0000-0003-000000000000
|
||||
00000000-0000-0000-0004-000000000000
|
||||
00000000-0000-0000-0005-000000000000
|
||||
00000000-0000-0000-0006-000000000000
|
||||
00000000-0000-0000-0007-000000000000
|
||||
00000000-0000-0000-0008-000000000000
|
||||
00000000-0000-0000-0009-000000000000
|
||||
00000000-0000-0000-000a-000000000000
|
||||
00000000-0000-0000-000b-000000000000
|
||||
00000000-0000-0000-000c-000000000000
|
||||
00000000-0000-0000-000d-000000000000
|
||||
00000000-0000-0000-000e-000000000000
|
||||
00000000-0000-0000-000f-000000000000
|
||||
00000000-0000-0000-0100-000000000000
|
||||
00000000-0000-0000-0200-000000000000
|
||||
00000000-0000-0000-0300-000000000000
|
||||
00000000-0000-0000-0400-000000000000
|
||||
00000000-0000-0000-0500-000000000000
|
||||
00000000-0000-0000-0600-000000000000
|
||||
00000000-0000-0000-0700-000000000000
|
||||
00000000-0000-0000-0800-000000000000
|
||||
00000000-0000-0000-0900-000000000000
|
||||
00000000-0000-0000-0a00-000000000000
|
||||
00000000-0000-0000-0b00-000000000000
|
||||
00000000-0000-0000-0c00-000000000000
|
||||
00000000-0000-0000-0d00-000000000000
|
||||
00000000-0000-0000-0e00-000000000000
|
||||
00000000-0000-0000-0f00-000000000000
|
||||
00000000-0000-0001-0000-000000000000
|
||||
00000000-0000-0002-0000-000000000000
|
||||
00000000-0000-0003-0000-000000000000
|
||||
00000000-0000-0004-0000-000000000000
|
||||
00000000-0000-0005-0000-000000000000
|
||||
00000000-0000-0006-0000-000000000000
|
||||
00000000-0000-0007-0000-000000000000
|
||||
00000000-0000-0008-0000-000000000000
|
||||
00000000-0000-0009-0000-000000000000
|
||||
00000000-0000-000a-0000-000000000000
|
||||
00000000-0000-000b-0000-000000000000
|
||||
00000000-0000-000c-0000-000000000000
|
||||
00000000-0000-000d-0000-000000000000
|
||||
00000000-0000-000e-0000-000000000000
|
||||
00000000-0000-000f-0000-000000000000
|
||||
00000000-0000-0100-0000-000000000000
|
||||
00000000-0000-0200-0000-000000000000
|
||||
00000000-0000-0300-0000-000000000000
|
||||
00000000-0000-0400-0000-000000000000
|
||||
00000000-0000-0500-0000-000000000000
|
||||
00000000-0000-0600-0000-000000000000
|
||||
00000000-0000-0700-0000-000000000000
|
||||
00000000-0000-0800-0000-000000000000
|
||||
00000000-0000-0900-0000-000000000000
|
||||
00000000-0000-0a00-0000-000000000000
|
||||
00000000-0000-0b00-0000-000000000000
|
||||
00000000-0000-0c00-0000-000000000000
|
||||
00000000-0000-0d00-0000-000000000000
|
||||
00000000-0000-0e00-0000-000000000000
|
||||
00000000-0000-0f00-0000-000000000000
|
||||
00000000-0001-0000-0000-000000000000
|
||||
00000000-0002-0000-0000-000000000000
|
||||
00000000-0003-0000-0000-000000000000
|
||||
00000000-0004-0000-0000-000000000000
|
||||
00000000-0005-0000-0000-000000000000
|
||||
00000000-0006-0000-0000-000000000000
|
||||
00000000-0007-0000-0000-000000000000
|
||||
00000000-0008-0000-0000-000000000000
|
||||
00000000-0009-0000-0000-000000000000
|
||||
00000000-000a-0000-0000-000000000000
|
||||
00000000-000b-0000-0000-000000000000
|
||||
00000000-000c-0000-0000-000000000000
|
||||
00000000-000d-0000-0000-000000000000
|
||||
00000000-000e-0000-0000-000000000000
|
||||
00000000-000f-0000-0000-000000000000
|
||||
00000000-0100-0000-0000-000000000000
|
||||
00000000-0200-0000-0000-000000000000
|
||||
00000000-0300-0000-0000-000000000000
|
||||
00000000-0400-0000-0000-000000000000
|
||||
00000000-0500-0000-0000-000000000000
|
||||
00000000-0600-0000-0000-000000000000
|
||||
00000000-0700-0000-0000-000000000000
|
||||
00000000-0800-0000-0000-000000000000
|
||||
00000000-0900-0000-0000-000000000000
|
||||
00000000-0a00-0000-0000-000000000000
|
||||
00000000-0b00-0000-0000-000000000000
|
||||
00000000-0c00-0000-0000-000000000000
|
||||
00000000-0d00-0000-0000-000000000000
|
||||
00000000-0e00-0000-0000-000000000000
|
||||
00000000-0f00-0000-0000-000000000000
|
||||
00000001-0000-0000-0000-000000000000
|
||||
00000002-0000-0000-0000-000000000000
|
||||
00000003-0000-0000-0000-000000000000
|
||||
00000004-0000-0000-0000-000000000000
|
||||
00000005-0000-0000-0000-000000000000
|
||||
00000006-0000-0000-0000-000000000000
|
||||
00000007-0000-0000-0000-000000000000
|
||||
00000008-0000-0000-0000-000000000000
|
||||
00000009-0000-0000-0000-000000000000
|
||||
0000000a-0000-0000-0000-000000000000
|
||||
0000000b-0000-0000-0000-000000000000
|
||||
0000000c-0000-0000-0000-000000000000
|
||||
0000000d-0000-0000-0000-000000000000
|
||||
0000000e-0000-0000-0000-000000000000
|
||||
0000000f-0000-0000-0000-000000000000
|
||||
00000100-0000-0000-0000-000000000000
|
||||
00000200-0000-0000-0000-000000000000
|
||||
00000300-0000-0000-0000-000000000000
|
||||
00000400-0000-0000-0000-000000000000
|
||||
00000500-0000-0000-0000-000000000000
|
||||
00000600-0000-0000-0000-000000000000
|
||||
00000700-0000-0000-0000-000000000000
|
||||
00000800-0000-0000-0000-000000000000
|
||||
00000900-0000-0000-0000-000000000000
|
||||
00000a00-0000-0000-0000-000000000000
|
||||
00000b00-0000-0000-0000-000000000000
|
||||
00000c00-0000-0000-0000-000000000000
|
||||
00000d00-0000-0000-0000-000000000000
|
||||
00000e00-0000-0000-0000-000000000000
|
||||
00000f00-0000-0000-0000-000000000000
|
||||
00010000-0000-0000-0000-000000000000
|
||||
00020000-0000-0000-0000-000000000000
|
||||
00030000-0000-0000-0000-000000000000
|
||||
00040000-0000-0000-0000-000000000000
|
||||
00050000-0000-0000-0000-000000000000
|
||||
00060000-0000-0000-0000-000000000000
|
||||
00070000-0000-0000-0000-000000000000
|
||||
00080000-0000-0000-0000-000000000000
|
||||
00090000-0000-0000-0000-000000000000
|
||||
000a0000-0000-0000-0000-000000000000
|
||||
000b0000-0000-0000-0000-000000000000
|
||||
000c0000-0000-0000-0000-000000000000
|
||||
000d0000-0000-0000-0000-000000000000
|
||||
000e0000-0000-0000-0000-000000000000
|
||||
000f0000-0000-0000-0000-000000000000
|
||||
01000000-0000-0000-0000-000000000000
|
||||
02000000-0000-0000-0000-000000000000
|
||||
03000000-0000-0000-0000-000000000000
|
||||
04000000-0000-0000-0000-000000000000
|
||||
05000000-0000-0000-0000-000000000000
|
||||
06000000-0000-0000-0000-000000000000
|
||||
07000000-0000-0000-0000-000000000000
|
||||
08000000-0000-0000-0000-000000000000
|
||||
09000000-0000-0000-0000-000000000000
|
||||
0a000000-0000-0000-0000-000000000000
|
||||
0b000000-0000-0000-0000-000000000000
|
||||
0c000000-0000-0000-0000-000000000000
|
||||
0d000000-0000-0000-0000-000000000000
|
||||
0e000000-0000-0000-0000-000000000000
|
||||
0f000000-0000-0000-0000-000000000000
|
||||
#
|
||||
# Lexicographical ORDER BY
|
||||
#
|
||||
@@ -1659,10 +1659,10 @@ INSERT INTO t1 VALUES (CAST(CONCAT('2','0000000-0000-0000-0000-000000000003') AS
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
10000000-0000-0000-0000-000000000001
|
||||
20000000-0000-0000-0000-000000000001
|
||||
10000000-0000-0000-0000-000000000002
|
||||
20000000-0000-0000-0000-000000000002
|
||||
10000000-0000-0000-0000-000000000003
|
||||
20000000-0000-0000-0000-000000000001
|
||||
20000000-0000-0000-0000-000000000002
|
||||
20000000-0000-0000-0000-000000000003
|
||||
DROP TABLE t1;
|
||||
#
|
||||
@@ -3178,8 +3178,8 @@ CREATE TABLE t1 (d UUID);
|
||||
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-111111111111'), ('11111111-0000-0000-0000-000000000000');
|
||||
SELECT * FROM t1 ORDER BY d;
|
||||
d
|
||||
11111111-0000-0000-0000-000000000000
|
||||
00000000-0000-0000-0000-111111111111
|
||||
11111111-0000-0000-0000-000000000000
|
||||
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
|
||||
d
|
||||
11111111-0000-0000-0000-000000000000
|
||||
|
||||
@@ -25,7 +25,7 @@ a
|
||||
00000000-0000-0000-0000-0000000000ff
|
||||
EXPLAIN SELECT * FROM t1 WHERE a='00000000-0000-0000-0000-0000000000ff';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 17 const 4 Using where
|
||||
1 SIMPLE t1 ref a a 17 const 2 Using where
|
||||
SELECT * FROM t1 WHERE a='garbage';
|
||||
a
|
||||
Warnings:
|
||||
@@ -66,7 +66,7 @@ EXPLAIN SELECT * FROM t1 WHERE a IN
|
||||
'00000000-0000-0000-0000-0000000000f0'
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 17 NULL 12 Using where
|
||||
1 SIMPLE t1 range a a 17 NULL 6 Using where
|
||||
SELECT * FROM t1 WHERE a IN
|
||||
(
|
||||
'00000000-0000-0000-0000-000000000080',
|
||||
@@ -85,7 +85,7 @@ EXPLAIN SELECT * FROM t1 WHERE a IN
|
||||
'garbage'
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 17 NULL 8 Using where
|
||||
1 SIMPLE t1 range a a 17 NULL 4 Using where
|
||||
Warnings:
|
||||
Warning 1292 Incorrect uuid value: 'garbage'
|
||||
SELECT * FROM t1 WHERE a BETWEEN
|
||||
@@ -178,7 +178,7 @@ a
|
||||
00000000-0000-0000-0000-0000000000ff
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=CAST('00000000-0000-0000-0000-0000000000ff' AS UUID);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ref a a 17 const 4 100.00 Using where
|
||||
1 SIMPLE t1 ref a a 17 const 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = UUID'00000000-0000-0000-0000-0000000000ff'
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -25,7 +25,7 @@ a
|
||||
00000000-0000-0000-0000-0000000000ff
|
||||
EXPLAIN SELECT * FROM t1 WHERE a='00000000-0000-0000-0000-0000000000ff';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 17 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref a a 17 const 7 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a='garbage';
|
||||
a
|
||||
Warnings:
|
||||
@@ -41,7 +41,7 @@ a
|
||||
00000000-0000-0000-0000-0000000000ff
|
||||
EXPLAIN SELECT * FROM t1 WHERE a>='00000000-0000-0000-0000-0000000000fe';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 17 NULL 3 Using where; Using index
|
||||
1 SIMPLE t1 range a a 17 NULL 28 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a>='garbage';
|
||||
a
|
||||
EXPLAIN SELECT * FROM t1 WHERE a>='garbage';
|
||||
@@ -64,7 +64,7 @@ EXPLAIN SELECT * FROM t1 WHERE a IN
|
||||
'00000000-0000-0000-0000-0000000000f0'
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 17 NULL 4 Using where; Using index
|
||||
1 SIMPLE t1 range a a 17 NULL 3 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a IN
|
||||
(
|
||||
'00000000-0000-0000-0000-000000000080',
|
||||
@@ -96,7 +96,7 @@ EXPLAIN SELECT * FROM t1 WHERE a BETWEEN
|
||||
'00000000-0000-0000-0000-000000000080' AND
|
||||
'00000000-0000-0000-0000-000000000081';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 17 NULL 2 Using where; Using index
|
||||
1 SIMPLE t1 range a a 17 NULL 1 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a BETWEEN
|
||||
'00000000-0000-0000-0000-000000000080' AND
|
||||
'garbage';
|
||||
@@ -111,7 +111,7 @@ a
|
||||
00000000-0000-0000-0000-0000000000ff
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=CAST('00000000-0000-0000-0000-0000000000ff' AS UUID);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ref a a 17 const 1 100.00 Using where; Using index
|
||||
1 SIMPLE t1 ref a a 17 const 7 100.00 Using where; Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = UUID'00000000-0000-0000-0000-0000000000ff'
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -21,12 +21,83 @@
|
||||
#include <mysql/plugin_data_type.h>
|
||||
#include <mysql/plugin_function.h>
|
||||
|
||||
/*
|
||||
The whole purpose of this Type_handler_uuid_dispatcher is to choose
|
||||
whether the field should use Type_handler_uuid_new or Type_handler_uuid_old
|
||||
based on the version of MariaDB that created the table.
|
||||
When created every field will use either Type_handler_uuid_new or _old.
|
||||
Literals and functions always use _new.
|
||||
*/
|
||||
class Type_handler_uuid_dispatcher: public Type_handler_uuid_new
|
||||
{
|
||||
public:
|
||||
Field *make_table_field_from_def(TABLE_SHARE *share, MEM_ROOT *root,
|
||||
const LEX_CSTRING *name, const Record_addr &addr,
|
||||
const Bit_addr &bit,
|
||||
const Column_definition_attributes *attr,
|
||||
uint32 flags) const override
|
||||
{
|
||||
bool new_uuid= share->mysql_version == 0 ||
|
||||
(share->mysql_version >= 100908 && share->mysql_version < 100999) ||
|
||||
(share->mysql_version >= 101006 && share->mysql_version < 101099) ||
|
||||
(share->mysql_version >= 101105 && share->mysql_version < 101199) ||
|
||||
(share->mysql_version >= 110003 && share->mysql_version < 110099) ||
|
||||
(share->mysql_version >= 110102 && share->mysql_version < 110199) ||
|
||||
share->mysql_version >= 110201;
|
||||
static Type_handler *th[]= {
|
||||
Type_handler_uuid_old::singleton(), Type_handler_uuid_new::singleton()
|
||||
};
|
||||
return th[new_uuid]->
|
||||
make_table_field_from_def(share, root, name, addr, bit, attr, flags);
|
||||
}
|
||||
};
|
||||
|
||||
static Type_handler_uuid_dispatcher type_handler_uuid_dispatcher;
|
||||
|
||||
static struct st_mariadb_data_type plugin_descriptor_type_uuid=
|
||||
{
|
||||
MariaDB_DATA_TYPE_INTERFACE_VERSION,
|
||||
UUIDBundle::type_handler_fbt()
|
||||
&type_handler_uuid_dispatcher
|
||||
};
|
||||
|
||||
|
||||
const Type_handler *Type_collection_uuid::find_in_array(const Type_handler *a,
|
||||
const Type_handler *b,
|
||||
bool for_cmp) const
|
||||
{
|
||||
if (a == b) return a;
|
||||
|
||||
/*
|
||||
in the search below we'll find if we can convert `b` to `a`.
|
||||
So, if one of the arguments is uuid and the other is not,
|
||||
we should put uuid type in `a` and not-uuid in `b`. And if one type is
|
||||
new uuid and the other is old uuid, new uuid should be in `a`
|
||||
*/
|
||||
if (a != Type_handler_uuid_new::singleton() && b->type_collection() == this)
|
||||
std::swap(a, b);
|
||||
|
||||
DBUG_ASSERT(a != &type_handler_uuid_dispatcher);
|
||||
DBUG_ASSERT(b != &type_handler_uuid_dispatcher);
|
||||
|
||||
/*
|
||||
Search in the array for an element, equal to `b`.
|
||||
If found - return `a`, if not found - return NULL.
|
||||
Array is terminated by `a`.
|
||||
*/
|
||||
static const Type_handler *arr[]={ &type_handler_varchar,
|
||||
&type_handler_string, &type_handler_tiny_blob, &type_handler_blob,
|
||||
&type_handler_medium_blob, &type_handler_hex_hybrid,
|
||||
// in aggregate_for_comparison() all types above cannot happen,
|
||||
// so we'll start the search from here:
|
||||
&type_handler_null, &type_handler_long_blob,
|
||||
Type_handler_uuid_old::singleton(), Type_handler_uuid_new::singleton() };
|
||||
|
||||
for (int i= for_cmp ? 6 : 0; arr[i] != a; i++)
|
||||
if (arr[i] == b)
|
||||
return a;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
class Create_func_uuid : public Create_func_arg0
|
||||
@@ -71,17 +142,26 @@ static Plugin_function
|
||||
plugin_descriptor_function_uuid(&Create_func_uuid::s_singleton),
|
||||
plugin_descriptor_function_sys_guid(&Create_func_sys_guid::s_singleton);
|
||||
|
||||
static constexpr Name type_name={STRING_WITH_LEN("uuid")};
|
||||
|
||||
int uuid_init(void*)
|
||||
{
|
||||
Type_handler_uuid_new::singleton()->set_name(type_name);
|
||||
Type_handler_uuid_old::singleton()->set_name(type_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
maria_declare_plugin(type_uuid)
|
||||
{
|
||||
MariaDB_DATA_TYPE_PLUGIN, // the plugin type (see include/mysql/plugin.h)
|
||||
&plugin_descriptor_type_uuid, // pointer to type-specific plugin descriptor
|
||||
"uuid", // plugin name
|
||||
type_name.ptr(), // plugin name
|
||||
"MariaDB Corporation", // plugin author
|
||||
"Data type UUID", // the plugin description
|
||||
PLUGIN_LICENSE_GPL, // the plugin license (see include/mysql/plugin.h)
|
||||
0, // Pointer to plugin initialization function
|
||||
uuid_init, // Pointer to plugin initialization function
|
||||
0, // Pointer to plugin deinitialization function
|
||||
0x0100, // Numeric version 0xAABB means AA.BB version
|
||||
NULL, // Status variables
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/* Copyright (c) 2019,2021 MariaDB Corporation
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
#define MYSQL_SERVER
|
||||
#include "mariadb.h"
|
||||
#include "my_net.h"
|
||||
#include "sql_class.h" // THD, SORT_FIELD_ATTR
|
||||
#include "opt_range.h" // SEL_ARG
|
||||
#include "sql_type_uuid.h"
|
||||
|
||||
|
||||
static bool get_digit(char ch, uint *val)
|
||||
{
|
||||
if (ch >= '0' && ch <= '9')
|
||||
{
|
||||
*val= (uint) ch - '0';
|
||||
return false;
|
||||
}
|
||||
if (ch >= 'a' && ch <= 'f')
|
||||
{
|
||||
*val= (uint) ch - 'a' + 0x0a;
|
||||
return false;
|
||||
}
|
||||
if (ch >= 'A' && ch <= 'F')
|
||||
{
|
||||
*val= (uint) ch - 'A' + 0x0a;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool get_digit(uint *val, const char *str, const char *end)
|
||||
{
|
||||
if (str >= end)
|
||||
return true;
|
||||
return get_digit(*str, val);
|
||||
}
|
||||
|
||||
|
||||
static size_t skip_hyphens(const char *str, const char *end)
|
||||
{
|
||||
const char *str0= str;
|
||||
for ( ; str < end; str++)
|
||||
{
|
||||
if (str[0] != '-')
|
||||
break;
|
||||
}
|
||||
return str - str0;
|
||||
}
|
||||
|
||||
|
||||
static const char *get_two_digits(char *val, const char *str, const char *end)
|
||||
{
|
||||
uint hi, lo;
|
||||
if (get_digit(&hi, str++, end))
|
||||
return NULL;
|
||||
str+= skip_hyphens(str, end);
|
||||
if (get_digit(&lo, str++, end))
|
||||
return NULL;
|
||||
*val= (char) ((hi << 4) + lo);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
bool UUID::ascii_to_fbt(const char *str, size_t str_length)
|
||||
{
|
||||
const char *end= str + str_length;
|
||||
/*
|
||||
The format understood:
|
||||
- Hyphen is not allowed on the first and the last position.
|
||||
- Otherwise, hyphens are allowed on any (odd and even) position,
|
||||
with any amount.
|
||||
*/
|
||||
if (str_length < 32)
|
||||
goto err;
|
||||
|
||||
for (uint oidx= 0; oidx < binary_length(); oidx++)
|
||||
{
|
||||
if (!(str= get_two_digits(&m_buffer[oidx], str, end)))
|
||||
goto err;
|
||||
// Allow hypheps after two digits, but not after the last digit
|
||||
if (oidx + 1 < binary_length())
|
||||
str+= skip_hyphens(str, end);
|
||||
}
|
||||
if (str < end)
|
||||
goto err; // Some input left
|
||||
return false;
|
||||
err:
|
||||
bzero(m_buffer, sizeof(m_buffer));
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t UUID::to_string(char *dst, size_t dstsize) const
|
||||
{
|
||||
my_uuid2str((const uchar *) m_buffer, dst, 1);
|
||||
return MY_UUID_STRING_LENGTH;
|
||||
}
|
||||
|
||||
|
||||
const Name &UUID::default_value()
|
||||
{
|
||||
static Name def(STRING_WITH_LEN("00000000-0000-0000-0000-000000000000"));
|
||||
return def;
|
||||
}
|
||||
@@ -17,13 +17,103 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
#include "sql_type_fixedbin_storage.h"
|
||||
|
||||
template <bool force_swap>
|
||||
class UUID: public FixedBinTypeStorage<MY_UUID_SIZE, MY_UUID_STRING_LENGTH>
|
||||
{
|
||||
bool get_digit(char ch, uint *val)
|
||||
{
|
||||
if (ch >= '0' && ch <= '9')
|
||||
{
|
||||
*val= (uint) ch - '0';
|
||||
return false;
|
||||
}
|
||||
if (ch >= 'a' && ch <= 'f')
|
||||
{
|
||||
*val= (uint) ch - 'a' + 0x0a;
|
||||
return false;
|
||||
}
|
||||
if (ch >= 'A' && ch <= 'F')
|
||||
{
|
||||
*val= (uint) ch - 'A' + 0x0a;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool get_digit(uint *val, const char *str, const char *end)
|
||||
{
|
||||
if (str >= end)
|
||||
return true;
|
||||
return get_digit(*str, val);
|
||||
}
|
||||
|
||||
size_t skip_hyphens(const char *str, const char *end)
|
||||
{
|
||||
const char *str0= str;
|
||||
for ( ; str < end; str++)
|
||||
{
|
||||
if (str[0] != '-')
|
||||
break;
|
||||
}
|
||||
return str - str0;
|
||||
}
|
||||
|
||||
const char *get_two_digits(char *val, const char *str, const char *end)
|
||||
{
|
||||
uint hi, lo;
|
||||
if (get_digit(&hi, str++, end))
|
||||
return NULL;
|
||||
str+= skip_hyphens(str, end);
|
||||
if (get_digit(&lo, str++, end))
|
||||
return NULL;
|
||||
*val= (char) ((hi << 4) + lo);
|
||||
return str;
|
||||
}
|
||||
|
||||
public:
|
||||
using FixedBinTypeStorage::FixedBinTypeStorage;
|
||||
bool ascii_to_fbt(const char *str, size_t str_length);
|
||||
size_t to_string(char *dst, size_t dstsize) const;
|
||||
static const Name &default_value();
|
||||
bool ascii_to_fbt(const char *str, size_t str_length)
|
||||
{
|
||||
const char *end= str + str_length;
|
||||
/*
|
||||
The format understood:
|
||||
- Hyphen is not allowed on the first and the last position.
|
||||
- Otherwise, hyphens are allowed on any (odd and even) position,
|
||||
with any amount.
|
||||
*/
|
||||
if (str_length < 32)
|
||||
goto err;
|
||||
|
||||
for (uint oidx= 0; oidx < binary_length(); oidx++)
|
||||
{
|
||||
if (!(str= get_two_digits(&m_buffer[oidx], str, end)))
|
||||
goto err;
|
||||
// Allow hypheps after two digits, but not after the last digit
|
||||
if (oidx + 1 < binary_length())
|
||||
str+= skip_hyphens(str, end);
|
||||
}
|
||||
if (str < end)
|
||||
goto err; // Some input left
|
||||
if (m_buffer[6] & -m_buffer[8] & 0x80)
|
||||
goto err; // impossible combination: version >= 8, variant = 0
|
||||
return false;
|
||||
err:
|
||||
bzero(m_buffer, sizeof(m_buffer));
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t to_string(char *dst, size_t dstsize) const
|
||||
{
|
||||
my_uuid2str((const uchar *) m_buffer, dst, 1);
|
||||
return MY_UUID_STRING_LENGTH;
|
||||
}
|
||||
|
||||
static const Name &default_value()
|
||||
{
|
||||
static Name def(STRING_WITH_LEN("00000000-0000-0000-0000-000000000000"));
|
||||
return def;
|
||||
}
|
||||
|
||||
/*
|
||||
Binary (in-memory) UUIDv1 representation:
|
||||
@@ -86,21 +176,31 @@ public:
|
||||
// Convert the in-memory representation to the in-record representation
|
||||
static void memory_to_record(char *to, const char *from)
|
||||
{
|
||||
segment(0).memory_to_record(to, from);
|
||||
segment(1).memory_to_record(to, from);
|
||||
segment(2).memory_to_record(to, from);
|
||||
segment(3).memory_to_record(to, from);
|
||||
segment(4).memory_to_record(to, from);
|
||||
if (force_swap || (from[6] > 0 && from[6] < 0x60 && from[8] & 0x80))
|
||||
{
|
||||
segment(0).memory_to_record(to, from);
|
||||
segment(1).memory_to_record(to, from);
|
||||
segment(2).memory_to_record(to, from);
|
||||
segment(3).memory_to_record(to, from);
|
||||
segment(4).memory_to_record(to, from);
|
||||
}
|
||||
else
|
||||
memcpy(to, from, binary_length());
|
||||
}
|
||||
|
||||
// Convert the in-record representation to the in-memory representation
|
||||
static void record_to_memory(char *to, const char *from)
|
||||
{
|
||||
segment(0).record_to_memory(to, from);
|
||||
segment(1).record_to_memory(to, from);
|
||||
segment(2).record_to_memory(to, from);
|
||||
segment(3).record_to_memory(to, from);
|
||||
segment(4).record_to_memory(to, from);
|
||||
if (force_swap || (from[6] & -from[8] & 0x80))
|
||||
{
|
||||
segment(0).record_to_memory(to, from);
|
||||
segment(1).record_to_memory(to, from);
|
||||
segment(2).record_to_memory(to, from);
|
||||
segment(3).record_to_memory(to, from);
|
||||
segment(4).record_to_memory(to, from);
|
||||
}
|
||||
else
|
||||
memcpy(to, from, binary_length());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -179,8 +279,38 @@ public:
|
||||
|
||||
};
|
||||
|
||||
class Type_collection_uuid: public Type_collection
|
||||
{
|
||||
const Type_handler *find_in_array(const Type_handler *what,
|
||||
const Type_handler *stop,
|
||||
bool for_comparison) const;
|
||||
public:
|
||||
const Type_handler *aggregate_for_result(const Type_handler *a,
|
||||
const Type_handler *b)
|
||||
const override
|
||||
{ return find_in_array(a, b, false); }
|
||||
const Type_handler *aggregate_for_min_max(const Type_handler *a,
|
||||
const Type_handler *b)
|
||||
const override
|
||||
{ return find_in_array(a, b, false); }
|
||||
const Type_handler *aggregate_for_comparison(const Type_handler *a,
|
||||
const Type_handler *b)
|
||||
const override
|
||||
{ return find_in_array(a, b, true); }
|
||||
const Type_handler *aggregate_for_num_op(const Type_handler *a,
|
||||
const Type_handler *b)
|
||||
const override
|
||||
{ return NULL; }
|
||||
|
||||
static Type_collection_uuid *singleton()
|
||||
{
|
||||
static Type_collection_uuid tc;
|
||||
return &tc;
|
||||
}
|
||||
};
|
||||
|
||||
#include "sql_type_fixedbin.h"
|
||||
typedef FixedBinTypeBundle<UUID> UUIDBundle;
|
||||
typedef Type_handler_fbt<UUID<1>, Type_collection_uuid> Type_handler_uuid_old;
|
||||
typedef Type_handler_fbt<UUID<0>, Type_collection_uuid> Type_handler_uuid_new;
|
||||
|
||||
#endif // SQL_TYPE_UUID_INCLUDED
|
||||
|
||||
@@ -143,23 +143,23 @@ static st_ddl_recovery recovery_state;
|
||||
mysql_mutex_t LOCK_gdl;
|
||||
|
||||
/* Positions to different data in a ddl log block */
|
||||
#define DDL_LOG_ENTRY_TYPE_POS 0
|
||||
static constexpr unsigned DDL_LOG_ENTRY_TYPE_POS= 0;
|
||||
/*
|
||||
Note that ACTION_TYPE and PHASE_POS must be after each other.
|
||||
See update_phase()
|
||||
*/
|
||||
#define DDL_LOG_ACTION_TYPE_POS 1
|
||||
#define DDL_LOG_PHASE_POS 2
|
||||
#define DDL_LOG_NEXT_ENTRY_POS 4
|
||||
static constexpr unsigned DDL_LOG_ACTION_TYPE_POS= 1;
|
||||
static constexpr unsigned DDL_LOG_PHASE_POS= 2;
|
||||
static constexpr unsigned DDL_LOG_NEXT_ENTRY_POS= 4;
|
||||
/* Flags to remember something unique about the query, like if .frm was used */
|
||||
#define DDL_LOG_FLAG_POS 8
|
||||
static constexpr unsigned DDL_LOG_FLAG_POS= 8;
|
||||
/* Used to store XID entry that was written to binary log */
|
||||
#define DDL_LOG_XID_POS 10
|
||||
static constexpr unsigned DDL_LOG_XID_POS= 10;
|
||||
/* Used to store unique uuid from the .frm file */
|
||||
#define DDL_LOG_UUID_POS 18
|
||||
/* ID_POS can be used to store something unique, like file size (8 bytes) */
|
||||
#define DDL_LOG_ID_POS DDL_LOG_UUID_POS + MY_UUID_SIZE
|
||||
#define DDL_LOG_END_POS DDL_LOG_ID_POS + 8
|
||||
static constexpr unsigned DDL_LOG_UUID_POS= 18;
|
||||
/* ID_POS can be used to store something unique, like file size (4 bytes) */
|
||||
static constexpr unsigned DDL_LOG_ID_POS= DDL_LOG_UUID_POS + MY_UUID_SIZE;
|
||||
static constexpr unsigned DDL_LOG_END_POS= DDL_LOG_ID_POS + 8;
|
||||
|
||||
/*
|
||||
Position to where names are stored in the ddl log blocks. The current
|
||||
@@ -167,19 +167,19 @@ mysql_mutex_t LOCK_gdl;
|
||||
space for constants in the header than what is between DDL_LOG_ID_POS and
|
||||
DDL_LOG_TMP_NAME_POS.
|
||||
*/
|
||||
#define DDL_LOG_TMP_NAME_POS 56
|
||||
static constexpr unsigned DDL_LOG_TMP_NAME_POS= 56;
|
||||
|
||||
/* Definitions for the ddl log header, the first block in the file */
|
||||
/* IO_SIZE is stored in the header and can thus be changed */
|
||||
#define DDL_LOG_IO_SIZE IO_SIZE
|
||||
static constexpr unsigned DDL_LOG_IO_SIZE= IO_SIZE;
|
||||
|
||||
/* Header is stored in positions 0-3 */
|
||||
#define DDL_LOG_IO_SIZE_POS 4
|
||||
#define DDL_LOG_NAME_OFFSET_POS 6
|
||||
static constexpr unsigned DDL_LOG_IO_SIZE_POS= 4;
|
||||
static constexpr unsigned DDL_LOG_NAME_OFFSET_POS= 6;
|
||||
/* Marks if we have done a backup of the ddl log */
|
||||
#define DDL_LOG_BACKUP_OFFSET_POS 8
|
||||
static constexpr unsigned DDL_LOG_BACKUP_OFFSET_POS= 8;
|
||||
/* Sum of the above variables */
|
||||
#define DDL_LOG_HEADER_SIZE 4+2+2+1
|
||||
static constexpr unsigned DDL_LOG_HEADER_SIZE= 4+2+2+1;
|
||||
|
||||
/**
|
||||
Sync the ddl log file.
|
||||
@@ -1104,7 +1104,7 @@ static void execute_rename_table(DDL_LOG_ENTRY *ddl_log_entry, handler *file,
|
||||
{
|
||||
fr_length= build_table_filename(from_path, FN_REFLEN,
|
||||
from_db->str, from_table->str, "",
|
||||
flags & FN_TO_IS_TMP);
|
||||
flags & FN_FROM_IS_TMP);
|
||||
to_length= build_table_filename(to_path, FN_REFLEN,
|
||||
to_db->str, to_table->str, "",
|
||||
flags & FN_TO_IS_TMP);
|
||||
|
||||
59
sql/ha_handler_stats.h
Normal file
59
sql/ha_handler_stats.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef HA_HANDLER_STATS_INCLUDED
|
||||
#define HA_HANDLER_STATS_INCLUDED
|
||||
/*
|
||||
Copyright (c) 2023, MariaDB Foundation
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; version 2 of
|
||||
the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
*/
|
||||
|
||||
/* Definitions for parameters to do with handler-routines */
|
||||
|
||||
class ha_handler_stats
|
||||
{
|
||||
public:
|
||||
ulonglong pages_accessed; /* Pages accessed from page cache */
|
||||
ulonglong pages_updated; /* Pages changed in page cache */
|
||||
ulonglong pages_read_count; /* Pages read from disk */
|
||||
ulonglong pages_read_time; /* Time reading pages, in microsec. */
|
||||
ulonglong undo_records_read;
|
||||
ulonglong engine_time; /* Time spent in engine in microsec */
|
||||
uint active; /* <> 0 if status has to be updated */
|
||||
#define first_stat pages_accessed
|
||||
#define last_stat engine_time
|
||||
inline void reset()
|
||||
{
|
||||
bzero((void*) this, sizeof(*this));
|
||||
}
|
||||
inline void add(ha_handler_stats *stats)
|
||||
{
|
||||
ulonglong *to= &first_stat;
|
||||
ulonglong *from= &stats->first_stat;
|
||||
do
|
||||
{
|
||||
(*to)+= *from++;
|
||||
} while (to++ != &last_stat);
|
||||
}
|
||||
inline bool has_stats()
|
||||
{
|
||||
ulonglong *to= &first_stat;
|
||||
do
|
||||
{
|
||||
if (*to)
|
||||
return 1;
|
||||
} while (to++ != &last_stat);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
#endif /* HA_HANDLER_STATS_INCLUDED */
|
||||
@@ -590,6 +590,7 @@ bool ha_partition::initialize_partition(MEM_ROOT *mem_root)
|
||||
my_error(ER_MIX_HANDLER_ERROR, MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
file->handler_stats= handler_stats;
|
||||
} while (*(++file_array));
|
||||
m_handler_status= handler_initialized;
|
||||
DBUG_RETURN(0);
|
||||
@@ -4048,6 +4049,13 @@ int ha_partition::discover_check_version()
|
||||
return m_file[0]->discover_check_version();
|
||||
}
|
||||
|
||||
static int set_part_handler_stats(handler *h, void *stats)
|
||||
{
|
||||
h->handler_stats= (ha_handler_stats*) stats;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Clone the open and locked partitioning handler.
|
||||
|
||||
@@ -4095,6 +4103,9 @@ handler *ha_partition::clone(const char *name, MEM_ROOT *mem_root)
|
||||
HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_NO_PSI_CALL))
|
||||
goto err;
|
||||
|
||||
if (handler_stats)
|
||||
new_handler->loop_partitions(set_part_handler_stats, handler_stats);
|
||||
|
||||
DBUG_RETURN((handler*) new_handler);
|
||||
|
||||
err:
|
||||
@@ -4103,6 +4114,16 @@ err:
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Update all sub partitions to point to handler stats
|
||||
*/
|
||||
|
||||
void ha_partition::handler_stats_updated()
|
||||
{
|
||||
loop_partitions(set_part_handler_stats, handler_stats);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Close handler object
|
||||
|
||||
|
||||
@@ -1649,5 +1649,6 @@ public:
|
||||
|
||||
bool can_convert_nocopy(const Field &field,
|
||||
const Column_definition &new_field) const override;
|
||||
void handler_stats_updated() override;
|
||||
};
|
||||
#endif /* HA_PARTITION_INCLUDED */
|
||||
|
||||
@@ -3224,6 +3224,7 @@ handler *handler::clone(const char *name, MEM_ROOT *mem_root)
|
||||
if (new_handler->ha_open(table, name, table->db_stat,
|
||||
HA_OPEN_IGNORE_IF_LOCKED, mem_root))
|
||||
goto err;
|
||||
new_handler->handler_stats= handler_stats;
|
||||
|
||||
return new_handler;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "sql_array.h" /* Dynamic_array<> */
|
||||
#include "mdl.h"
|
||||
#include "vers_string.h"
|
||||
#include "ha_handler_stats.h"
|
||||
|
||||
#include "sql_analyze_stmt.h" // for Exec_time_tracker
|
||||
|
||||
@@ -3175,13 +3176,23 @@ protected:
|
||||
|
||||
ha_rows estimation_rows_to_insert;
|
||||
handler *lookup_handler;
|
||||
/* Statistics for the query. Updated if handler_stats.in_use is set */
|
||||
ha_handler_stats active_handler_stats;
|
||||
void set_handler_stats();
|
||||
public:
|
||||
handlerton *ht; /* storage engine of this handler */
|
||||
uchar *ref; /* Pointer to current row */
|
||||
uchar *dup_ref; /* Pointer to duplicate row */
|
||||
uchar *lookup_buffer;
|
||||
|
||||
/* General statistics for the table like number of row, file sizes etc */
|
||||
ha_statistics stats;
|
||||
/*
|
||||
Collect query stats here if pointer is != NULL.
|
||||
This is a pointer because if we do a clone of the handler, we want to
|
||||
use the original handler for collecting statistics.
|
||||
*/
|
||||
ha_handler_stats *handler_stats;
|
||||
|
||||
/** MultiRangeRead-related members: */
|
||||
range_seq_t mrr_iter; /* Iterator to traverse the range sequence */
|
||||
@@ -3375,8 +3386,8 @@ public:
|
||||
:table_share(share_arg), table(0),
|
||||
estimation_rows_to_insert(0),
|
||||
lookup_handler(this),
|
||||
ht(ht_arg), ref(0), lookup_buffer(NULL), end_range(NULL),
|
||||
implicit_emptied(0),
|
||||
ht(ht_arg), ref(0), lookup_buffer(NULL), handler_stats(NULL),
|
||||
end_range(NULL), implicit_emptied(0),
|
||||
mark_trx_read_write_done(0),
|
||||
check_table_binlog_row_based_done(0),
|
||||
check_table_binlog_row_based_result(0),
|
||||
@@ -4808,6 +4819,22 @@ public:
|
||||
{
|
||||
check_table_binlog_row_based_done= 0;
|
||||
}
|
||||
virtual void handler_stats_updated() {}
|
||||
|
||||
inline void ha_handler_stats_reset()
|
||||
{
|
||||
handler_stats= &active_handler_stats;
|
||||
active_handler_stats.reset();
|
||||
active_handler_stats.active= 1;
|
||||
handler_stats_updated();
|
||||
}
|
||||
inline void ha_handler_stats_disable()
|
||||
{
|
||||
handler_stats= 0;
|
||||
active_handler_stats.active= 0;
|
||||
handler_stats_updated();
|
||||
}
|
||||
|
||||
private:
|
||||
/* Cache result to avoid extra calls */
|
||||
inline void mark_trx_read_write()
|
||||
@@ -5163,6 +5190,7 @@ public:
|
||||
}
|
||||
|
||||
bool log_not_redoable_operation(const char *operation);
|
||||
|
||||
protected:
|
||||
Handler_share *get_ha_share_ptr();
|
||||
void set_ha_share_ptr(Handler_share *arg_ha_share);
|
||||
|
||||
@@ -996,7 +996,10 @@ class Item_func_tochar :public Item_str_func
|
||||
|
||||
bool check_arguments() const override
|
||||
{
|
||||
return check_argument_types_can_return_text(1, arg_count);
|
||||
return
|
||||
(args[0]->check_type_can_return_date(func_name_cstring()) &&
|
||||
args[0]->check_type_can_return_time(func_name_cstring())) ||
|
||||
check_argument_types_can_return_text(1, arg_count);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
39
sql/log.cc
39
sql/log.cc
@@ -3323,6 +3323,10 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
|
||||
char buff[80], *end;
|
||||
char query_time_buff[22+7], lock_time_buff[22+7];
|
||||
size_t buff_len;
|
||||
ulonglong log_slow_verbosity= thd->variables.log_slow_verbosity;
|
||||
if (log_slow_verbosity & LOG_SLOW_VERBOSITY_FULL)
|
||||
log_slow_verbosity= ~(ulonglong) 0;
|
||||
|
||||
end= buff;
|
||||
|
||||
if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT))
|
||||
@@ -3349,7 +3353,6 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
|
||||
my_b_write(&log_file, (uchar*) "\n", 1))
|
||||
goto err;
|
||||
|
||||
/* For slow query log */
|
||||
sprintf(query_time_buff, "%.6f", ulonglong2double(query_utime)/1000000.0);
|
||||
sprintf(lock_time_buff, "%.6f", ulonglong2double(lock_utime)/1000000.0);
|
||||
if (my_b_printf(&log_file,
|
||||
@@ -3365,8 +3368,33 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
|
||||
(ulong) (thd->status_var.bytes_sent - thd->bytes_sent_old)))
|
||||
goto err;
|
||||
|
||||
if ((thd->variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_QUERY_PLAN)
|
||||
&& thd->tmp_tables_used &&
|
||||
if (unlikely(log_slow_verbosity &
|
||||
LOG_SLOW_VERBOSITY_ENGINE) &&
|
||||
thd->handler_stats.has_stats())
|
||||
{
|
||||
ha_handler_stats *stats= &thd->handler_stats;
|
||||
double tracker_frequency= timer_tracker_frequency();
|
||||
sprintf(query_time_buff, "%.4f",
|
||||
1000.0 * ulonglong2double(stats->pages_read_time)/
|
||||
tracker_frequency);
|
||||
sprintf(lock_time_buff, "%.4f",
|
||||
1000.0 * ulonglong2double(stats->engine_time)/
|
||||
tracker_frequency);
|
||||
|
||||
if (my_b_printf(&log_file,
|
||||
"# Pages_accessed: %lu Pages_read: %lu "
|
||||
"Pages_updated: %lu Old_rows_read: %lu\n"
|
||||
"# Pages_read_time: %s Engine_time: %s\n",
|
||||
(ulong) stats->pages_accessed,
|
||||
(ulong) stats->pages_read_count,
|
||||
(ulong) stats->pages_updated,
|
||||
(ulong) stats->undo_records_read,
|
||||
query_time_buff, lock_time_buff))
|
||||
goto err;
|
||||
}
|
||||
|
||||
if ((log_slow_verbosity & LOG_SLOW_VERBOSITY_QUERY_PLAN) &&
|
||||
thd->tmp_tables_used &&
|
||||
my_b_printf(&log_file,
|
||||
"# Tmp_tables: %lu Tmp_disk_tables: %lu "
|
||||
"Tmp_table_sizes: %s\n",
|
||||
@@ -3380,7 +3408,7 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
|
||||
ErrConvDQName(thd->spcont->m_sp).ptr()))
|
||||
goto err;
|
||||
|
||||
if ((thd->variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_QUERY_PLAN) &&
|
||||
if ((log_slow_verbosity & LOG_SLOW_VERBOSITY_QUERY_PLAN) &&
|
||||
(thd->query_plan_flags &
|
||||
(QPLAN_FULL_SCAN | QPLAN_FULL_JOIN | QPLAN_TMP_TABLE |
|
||||
QPLAN_TMP_DISK | QPLAN_FILESORT | QPLAN_FILESORT_DISK |
|
||||
@@ -3402,8 +3430,7 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
|
||||
"Yes" : "No")
|
||||
))
|
||||
goto err;
|
||||
if (thd->variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_EXPLAIN &&
|
||||
thd->lex->explain)
|
||||
if (log_slow_verbosity & LOG_SLOW_VERBOSITY_EXPLAIN && thd->lex->explain)
|
||||
{
|
||||
StringBuffer<128> buf;
|
||||
DBUG_ASSERT(!thd->free_list);
|
||||
|
||||
@@ -19,9 +19,15 @@
|
||||
#define LOG_SLOW_INCLUDED
|
||||
|
||||
#define LOG_SLOW_VERBOSITY_INIT 0
|
||||
#define LOG_SLOW_VERBOSITY_INNODB (1U << 0)
|
||||
#define LOG_SLOW_VERBOSITY_INNODB (1U << 0) /* Old option */
|
||||
#define LOG_SLOW_VERBOSITY_QUERY_PLAN (1U << 1)
|
||||
#define LOG_SLOW_VERBOSITY_EXPLAIN (1U << 2)
|
||||
#define LOG_SLOW_VERBOSITY_STORAGE_ENGINE (1U << 3) /* Replaces InnoDB */
|
||||
#define LOG_SLOW_VERBOSITY_FULL (1U << 4)
|
||||
|
||||
#define LOG_SLOW_VERBOSITY_ENGINE (LOG_SLOW_VERBOSITY_FULL | \
|
||||
LOG_SLOW_VERBOSITY_INNODB | \
|
||||
LOG_SLOW_VERBOSITY_STORAGE_ENGINE)
|
||||
|
||||
#define QPLAN_INIT QPLAN_QC_NO
|
||||
|
||||
|
||||
@@ -620,20 +620,24 @@ public:
|
||||
restore_lex(THD *thd)
|
||||
{
|
||||
DBUG_ENTER("sp_head::restore_lex");
|
||||
/*
|
||||
There is no a need to free the current thd->lex here.
|
||||
- In the majority of the cases restore_lex() is called
|
||||
on success and thd->lex does not need to be deleted.
|
||||
- In cases when restore_lex() is called on error,
|
||||
e.g. from sp_create_assignment_instr(), thd->lex is
|
||||
already linked to some sp_instr_xxx (using sp_lex_keeper).
|
||||
|
||||
Note, we don't get to here in case of a syntax error
|
||||
when the current thd->lex is not yet completely
|
||||
initialized and linked. It gets automatically deleted
|
||||
by the Bison %destructor in sql_yacc.yy.
|
||||
*/
|
||||
LEX *oldlex= (LEX *) m_lex.pop();
|
||||
if (!oldlex)
|
||||
DBUG_RETURN(false); // Nothing to restore
|
||||
LEX *sublex= thd->lex;
|
||||
// This restores thd->lex and thd->stmt_lex
|
||||
if (thd->restore_from_local_lex_to_old_lex(oldlex))
|
||||
DBUG_RETURN(true);
|
||||
if (!sublex->sp_lex_in_use)
|
||||
{
|
||||
sublex->sphead= NULL;
|
||||
lex_end(sublex);
|
||||
delete sublex;
|
||||
}
|
||||
DBUG_RETURN(false);
|
||||
DBUG_RETURN(thd->restore_from_local_lex_to_old_lex(oldlex));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,9 +35,20 @@ log, should the query be slow.
|
||||
2. Timing data. Measuring the time it took to run parts of query has noticeable
|
||||
overhead. Because of that, we measure the time only when running "ANALYZE
|
||||
$stmt").
|
||||
|
||||
*/
|
||||
|
||||
/* fake microseconds as cycles if cycles isn't available */
|
||||
|
||||
static inline double timer_tracker_frequency()
|
||||
{
|
||||
#if (MY_TIMER_ROUTINE_CYCLES)
|
||||
return static_cast<double>(sys_timer_info.cycles.frequency);
|
||||
#else
|
||||
return static_cast<double>(sys_timer_info.microseconds.frequency);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
class Gap_time_tracker;
|
||||
void attach_gap_time_tracker(THD *thd, Gap_time_tracker *gap_tracker, ulonglong timeval);
|
||||
void process_gap_time_tracker(THD *thd, ulonglong timeval);
|
||||
@@ -52,12 +63,19 @@ protected:
|
||||
ulonglong cycles;
|
||||
ulonglong last_start;
|
||||
|
||||
ulonglong measure() const
|
||||
{
|
||||
#if (MY_TIMER_ROUTINE_CYCLES)
|
||||
return my_timer_cycles();
|
||||
#else
|
||||
return my_timer_microseconds();
|
||||
#endif
|
||||
}
|
||||
|
||||
void cycles_stop_tracking(THD *thd)
|
||||
{
|
||||
ulonglong end= my_timer_cycles();
|
||||
ulonglong end= measure();
|
||||
cycles += end - last_start;
|
||||
if (unlikely(end < last_start))
|
||||
cycles += ULONGLONG_MAX;
|
||||
|
||||
process_gap_time_tracker(thd, end);
|
||||
if (my_gap_tracker)
|
||||
@@ -80,7 +98,7 @@ public:
|
||||
// interface for collecting time
|
||||
void start_tracking(THD *thd)
|
||||
{
|
||||
last_start= my_timer_cycles();
|
||||
last_start= measure();
|
||||
process_gap_time_tracker(thd, last_start);
|
||||
}
|
||||
|
||||
@@ -92,11 +110,21 @@ public:
|
||||
|
||||
// interface for getting the time
|
||||
ulonglong get_loops() const { return count; }
|
||||
double get_time_ms() const
|
||||
|
||||
inline double cycles_to_ms(ulonglong cycles_arg) const
|
||||
{
|
||||
// convert 'cycles' to milliseconds.
|
||||
return 1000.0 * static_cast<double>(cycles) /
|
||||
static_cast<double>(sys_timer_info.cycles.frequency);
|
||||
return 1000.0 * static_cast<double>(cycles_arg) /
|
||||
timer_tracker_frequency();
|
||||
}
|
||||
|
||||
double get_time_ms() const
|
||||
{
|
||||
return cycles_to_ms(cycles);
|
||||
}
|
||||
ulonglong get_cycles() const
|
||||
{
|
||||
return cycles;
|
||||
}
|
||||
|
||||
bool has_timed_statistics() const { return cycles > 0; }
|
||||
@@ -122,13 +150,11 @@ public:
|
||||
double get_time_ms() const
|
||||
{
|
||||
// convert 'cycles' to milliseconds.
|
||||
return 1000.0 * static_cast<double>(cycles) /
|
||||
static_cast<double>(sys_timer_info.cycles.frequency);
|
||||
return 1000.0 * static_cast<double>(cycles) / timer_tracker_frequency();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
A class for counting certain actions (in all queries), and optionally
|
||||
collecting the timings (in ANALYZE queries).
|
||||
|
||||
@@ -969,11 +969,12 @@ int close_thread_tables(THD *thd)
|
||||
void close_thread_table(THD *thd, TABLE **table_ptr)
|
||||
{
|
||||
TABLE *table= *table_ptr;
|
||||
handler *file= table->file;
|
||||
DBUG_ENTER("close_thread_table");
|
||||
DBUG_PRINT("tcache", ("table: '%s'.'%s' %p", table->s->db.str,
|
||||
table->s->table_name.str, table));
|
||||
DBUG_ASSERT(!table->file->keyread_enabled());
|
||||
DBUG_ASSERT(table->file->inited == handler::NONE);
|
||||
DBUG_ASSERT(!file->keyread_enabled());
|
||||
DBUG_ASSERT(file->inited == handler::NONE);
|
||||
|
||||
/*
|
||||
The metadata lock must be released after giving back
|
||||
@@ -983,13 +984,20 @@ void close_thread_table(THD *thd, TABLE **table_ptr)
|
||||
table->s->db.str,
|
||||
table->s->table_name.str,
|
||||
MDL_SHARED));
|
||||
|
||||
table->vcol_cleanup_expr(thd);
|
||||
table->mdl_ticket= NULL;
|
||||
|
||||
table->file->update_global_table_stats();
|
||||
table->file->update_global_index_stats();
|
||||
|
||||
file->update_global_table_stats();
|
||||
file->update_global_index_stats();
|
||||
if (unlikely(thd->variables.log_slow_verbosity &
|
||||
LOG_SLOW_VERBOSITY_ENGINE) &&
|
||||
likely(file->handler_stats))
|
||||
{
|
||||
Exec_time_tracker *tracker;
|
||||
if ((tracker= file->get_time_tracker()))
|
||||
file->handler_stats->engine_time+= tracker->get_cycles();
|
||||
thd->handler_stats.add(file->handler_stats);
|
||||
}
|
||||
/*
|
||||
This look is needed to allow THD::notify_shared_lock() to
|
||||
traverse the thd->open_tables list without having to worry that
|
||||
@@ -1003,17 +1011,17 @@ void close_thread_table(THD *thd, TABLE **table_ptr)
|
||||
if (! table->needs_reopen())
|
||||
{
|
||||
/* Avoid having MERGE tables with attached children in table cache. */
|
||||
table->file->extra(HA_EXTRA_DETACH_CHILDREN);
|
||||
file->extra(HA_EXTRA_DETACH_CHILDREN);
|
||||
/* Free memory and reset for next loop. */
|
||||
free_field_buffers_larger_than(table, MAX_TDC_BLOB_SIZE);
|
||||
table->file->ha_reset();
|
||||
file->ha_reset();
|
||||
}
|
||||
|
||||
/*
|
||||
Do this *before* entering the TABLE_SHARE::tdc.LOCK_table_share
|
||||
critical section.
|
||||
*/
|
||||
MYSQL_UNBIND_TABLE(table->file);
|
||||
MYSQL_UNBIND_TABLE(file);
|
||||
|
||||
tc_release_table(table);
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user